The Michigan Senate on Tuesday agreed to Gov. Rick Snyder’s call for spending millions in state funds to spare the pensions of Detroit retirees from deeper cuts and to avoid the sale of artworks from the city’s museum, part of a larger bargain aimed at bringing a swift close to the nation’s largest municipal bankruptcy.

Securing nearly $200 million in state money, which was approved last month by the House, was seen as a crucial step toward a so-called grand bargain that Mr. Snyder, federal mediators, foundation leaders and others insist could ease Detroit out of bankruptcy court by fall.

The series of votes in the Legislature, which is controlled by Republicans, was also a significant victory for Mr. Snyder, a Republican, as he seeks re-election on a record that includes a central role in pushing Detroit toward bankruptcy protection last July. Mr. Snyder, who never held political office before his election as governor four years ago and who is known more as a polite accountant than a political deal maker, had faced roadblocks from some in his own party who questioned the wisdom of “bailing out” the long-troubled city.

In the end, lawmakers said, their agreement came down to a matter of compromises on details of the state’s involvement, including measures to give state officials oversight of Detroit’s spending for years. Among lawmakers there was also a sense of resignation that a settlement now — with nearly $200 million from the state’s rainy-day fund — might ultimately cost Michigan less than a drawn-out bankruptcy. The series of nine related bills cleared the Senate with surprisingly little rancor, though the votes on providing the money itself were fairly close, 21 to 17.