By Nicolás Misculin

BUENOS AIRES (Reuters) - Argentina's Senate has handed libertarian President Javier Milei a major win by approving his key reform bill and a twin fiscal package, but not without exacting a significant toll, watering down both legislations to push them through.

The Senate late on Wednesday approved in general terms Milei's so-called "Bases" law by a razor-thin margin, a boost for his austerity and pro-market program that has spurred markets and improved state finances, but hit the wider economy hard.

In the early hours of Thursday it also approved a separate fiscal package in general terms, but rejected specific portions on taxes and property.

While the bills will go back to the lower house of deputies to ratify the changes, the Senate backing is the critical victory for Milei, an ebullient economist and former pundit who took office in December pledging to overhaul the embattled country's economy.

Argentina is grappling with triple-digit inflation, high debt loads, distorting capital controls and depleted central bank reserves. Milei has made getting the state's finances in order his focus, a tough medicine approach that's helped over-turn a deep fiscal deficit but hit economic activity and jobs.

The Senate approval boosted Argentina's international dollar bonds on Thursday after investors breathed a sigh of relief that the sprawling bill that includes articles on privatizations to incentives for investment had not been rejected.

The win signaled Milei's ability to win over conservative and centrist allies, despite his libertarian party only having a small minority of seats in Congress. It also came amid violent and fiery protests against the bill outside the legislature.

"It is symbolic to have shown that such a minority force in both chambers can achieve the approval of such an important law," cabinet chief Guillermo Francos said in a statement.

The government had to negotiate hard, however, to win support, agreeing to changes to the investment incentive plans and removing key state entities such as the national airline and postal service from a list of firms to be privatized.

"It is a key step, even if it's not the (original) official proposal nor the one approved by Deputies," said Juan Massot, an economic scientist at the local Universidad del Salvador. "It strengthens the government and eases investor anxiety."

Ernesto Revilla, Latin America economist at Citi, said in a note to clients that the Senate backing was a victory for Milei, but had come at a cost.

"The approval of the bill marks a bittersweet win for Milei's administration, in our view, with approval of a bill that has been six months in the working but has been constantly diluted in the process," he wrote.

(Reporting by Nicolas Misculin; Additional reporting by Karin Strohecker and Hernan Nessi; Editing by Adam Jourdan and Alistair Bell)