* Brent set for 23 pct qtrly gain, biggest since Q2 2008
* U.S. crude set for near 16 percent quarterly gain
* Coming up: U.S. March nonfarm payrolls data Friday (Recasts, updates prices and market activity, changes byline and moves dateline from previous LONDON)
By Robert Gibbons
NEW YORK, March 31 (Reuters) - Oil prices rose on Thursday on the last day of the quarter, with Brent heading for its second biggest quarterly rise as Middle East protests and unrest and Libya's conflict kept threats to supply in focus.
U.S. crude prices rallied to within 18 cents, but failed to push above, its 2-1/2 year peak of $106.95 from March 7 and also headed to a double-digit quarterly gain.
Oil prices built on early gains when a U.S. government report showed jobless claims fell last week, the report arriving a day before the closely watched March nonfarm payrolls report. [
]Adding support, the Institute for Supply Management-Chicago said its employment index in March hit the highest level since December 1983, though its overall business barometer dipped in February. [
]Oil prices continue to be supported by geopolitical supply risks and economic growth after the most turbulent and volatile quarter for the oil market since the end of 2008, analysts said.
Brent crude for May <LCOc1> rose $2.01 to $117.14 a barrel by 12:13 p.m. (1613 GMT), having jumped earlier to $117.70.
May Brent must push above a $118.42 contract high ahead of the front-month 2-1/2-year high near $120 struck on Feb. 24.
Brent had fallen below $108 in the aftermath of Japan's March 11 earthquake and tsunami, but was on course to finish the quarter up over 23 percent.
U.S. crude <CLc1> rose $1.93 to $106.20, having earlier hit $106.77 and on track for a near 16 percent quarterly gain.
Trading volumes remained tepid, but neared 300,000 lots traded for both Brent and U.S. crudes.
CONFLICT IN LIBYA
The prospect of a protracted conflict in Libya remained as forces loyal to Muammar Gaddafi took back oil ports at Ras Lanuf and Brega. Rebels massed for a counter-attack in eastern Libya on Thursday, both encouraged by and wary of news of covert U.S. support and the defection of Gaddafi's foreign minister. [
]Libya's top oil official Shokri Ghanem said he remained in Tripoli and the country was continuing to produce some oil, although output was much reduced. [
] <^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ More on Middle East unrest: [ ] [ ] Libya graphics http: //link.reuters.com/neg68r Interactive graphic http://link.reuters.com/puk87r ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>MIDDLE EAST UNREST
Investors also eyed Bahrain, where dozens were missing and more than 300 were detained after a crackdown targeting activists and Shi'ites, the opposition said. [
]"Friday prayers may be a key issue supporting the market now, and some of the focus is starting to shift back to Japan and the cost of rebuilding the country," said Thorbjoern Bak Jensen, an analyst at Global Risk Management.
The conclusion of Friday prayers has been a favored time for protests in the region.
Protests and unrest in Syria and Yemen have also been part of the geopolitical risk premium. (Additional reporting by Jessica Donati, Nia Williams, Claire Milhench in London and Alejandro Barbajosa in Singapore; Editing by Marguerita Choy)