* Oil firm's Q4 net profit rises to 137 million euros
* CEO does not rule out investment cutbacks from 2016 (Adds CEO, analysts)
By Andrei Khalip and Shrikesh Laxmidas
LISBON, Feb 9 (Reuters) - Soaring oil refining margins helped Portugal's Galp Energia beat fourth-quarter net profit forecasts on Monday, as the firm's CEO said he did not expect weak oil prices to affect this year's investment plans.
Primarily a refiner, Galp said its margin from that part of the business rose to $5.4 per barrel from $1.7 a year earlier.
But slumping crude prices that boosted the margin weighed on Galp's upstream division, with operating earnings in exploration and production falling 7 percent despite a 43 percent rise in oil output, primarily in Brazil.
Chief executive Manuel Ferreira de Oliveira told reporters he was comfortable with this year's investment programme despite the subdued market, though he did not rule out cutbacks in subsequent years.
"If this fall lasts for a long time, then we will have time to adjust what we need to do, that is for 2016, 2017 and 2018 during this year," he said.
Oil prices have fallen close to 50 percent since last June.
Galp is expected to update its outlook on March 10. In 2014, it earmarked 1.5 billion to 1.7 billion euros in annual investment until 2018.
Net profit at Galp, rose to 137 million euros ($155 million) from 92 million euros a year earlier, beating average analyst forecasts of 114 million.
Galp shares rose over 2 percent to 10.3 euros, outpacing the broader Lisbon market.
Analysts at Jefferies said Galp's downstream businesses performed better than expected, but that the brokerage's 14 euro target price was based mainly on the expected successful delivery of upstream growth projects in Brazil.
Galp processed nearly 14 percent more crude in the fourth quarter than a year earlier, with 24.3 million barrels refined. Its oil and natural gas output from stakes in overseas projects rose to 36,300 barrels of oil equivalent per day (boepd).
Galp has stakes in projects in Brazil, which accounted for 76 percent of its output, and Angola. It plans to boost production over the coming years and expects net installed capacity to reach 350,000 boepd by 2020.
$1 = 0.8826 euros Reporting by Andrei Khalip; editing by David Clarke and John Stonestreet