(Updates with closing prices)
BUENOS AIRES, July 17 (Reuters) - Argentine stocks closed moderately higher on Thursday, while the peso firmed and bond prices rose after the Senate rejected a controversial government tax rise on soy exports.
Despite uncertainty over the government's next step, markets generally welcomed the Senate vote against a measure that sparked four months of farm protests in Argentina, a major global supplier of soy, corn, wheat and beef.
The MerVal .MERV benchmark stocks index ended up 0.85 percent at 1,893.43 after rising by as much as 2.8 percent earlier in the session.
"Shares in banks, service companies and firms linked to the farm sector were the ones that rose the most, while energy-related shares fell" on lower crude oil prices, said Antonio Cejuela, an analyst at Puente Hermanos brokerage.
Gains were led in part by food producer and grains exporter Molinos Rio de la Plata (MOL.BA), whose shares jumped 6.9 percent to end at 9.25 pesos.
Trading volume on the MerVal was a modest $29 million. Among active issues, 72 rose, 17 fell and 17 were unchanged.
Meanwhile, Argentine bonds traded on the local market also got a boost, closing about 1 percent higher on average in over-the-counter trade. The farm conflict dealt a severe blow to debt prices since March.
The peso-denominated Disc bond ARDISCP=RASL, which matures in 2033, rose 1 percent according to the bid price. State-run banks including the central bank have concentrated their purchases recently in this paper, traders said.
At the same time, the dollar-denominated Par bond ARPARD=RASL, maturing in 2038, gained 1.5 percent.
On the foreign exchange market, the peso firmed slightly as the central bank both sold and bought dollars, traders said.
In formal interbank trade, where the central bank regularly intervenes, the peso ARS=RASL strengthened 0.08 percent to end at 3.0225/3.0250 per dollar.
In informal trade between foreign-exchange houses, as measured by Reuters, the peso gained 0.16 percent to 3.0775/3.0800 per dollar ARSB=.
"Once this conflict is resolved, a flood of dollars will hit the market, which will allow the central bank to rebuild its foreign reserves," currency trader Jose Ansa said.
The central bank has sold $2.7 billion in dollar reserves since March to prop up the peso during the farm dispute. (Reporting by Walter Bianchi; Writing by Hilary Burke; Editing by James Dalgleish)