ATHENS — After marathon talks with foreign auditors, the Greek government said Sunday that it had reached a deal on how to slash its unwieldy public sector by putting 30,000 workers on a scheme that would lead to early retirement for some and dismissal for others, in a bid to meet conditions set by foreign lenders for the release of crucial emergency loans.

The government also completed a draft budget for 2012, which is expected to be presented in Parliament on Monday and voted on by the end of October, and conceded that it would miss a deficit-reduction target of 7.6 percent of gross domestic product. The deficit is projected to equal 8.5 percent of G.D.P. this year. The deficit shortfall had been expected because of delays in carrying out reforms and a deeper-than-expected recession, with the Greek economy forecast to contract by 5.5 percent this year.

In comments made late on Sunday after a cabinet meeting, a government spokesman, Ilias Mossialos, said Sunday’s deal was the result of “long and difficult negotiations” with foreign auditors and that it constituted the “gentlest possible scenario in terms of social repercussions.”

According to the text of the draft law distributed to the local news media, 30,000 civil servants — or 3 percent of the public work force — would be put on reduced salary by the end of the year. The majority, some 23,000, are at least 60 years old and essentially would be forced into early retirement. The remainder would lose their positions through the merging and abolition of dozens of government agencies. Mr. Mossialos said the plan would save the government some 300 million euros, or $400 million, from the public sector wage bill in 2012.