Both the union and employers said in overnight statements they had reached a "tolerable compromise" with some "painful elements" covering 900,000 workers in key industrial state Baden-Württemberg, which could be extended to the 3.9 million workers in the sector across the country.
The key concession is the right for more senior employees to cut their working week to 28 hours for a limited period of six to 24 months.
The union had pushed for staff to have a right to more flexible working conditions around key life moments such as the birth of a child, looking after a relative or ill health - with the right to return to full-time hours afterwards.
But bosses rejected unions' demand that they continue paying full-time salaries to some of those who choose a limited period of reduced working hours.
Meanwhile, employers also gained more flexibility, to increase willing workers' weeks to 40 hours from the standard 35.
The compromise was "reasonably balanced" between the needs of the two sides, said Stefan Wolf, head of regional employers' federation Südwestmetall.
"Employees get more options to reduce their working time, while companies have more ways to increase the total number of hours worked."
Firms had feared that granting too generous a deal on hours would drastically slash the amount of labour available - at a time when the economy is bounding ahead, leaving some companies struggling to fill orders and to find skilled workers for open positions.
For IG Metall, "the agreement is a milestone on the way to a modern, self-determined world of work," said leader Jörg Hofmann.
The deal came after half a million workers drawn from sectors as varied as carmaking, electrical and electronic goods or metal production downed tools last week in 24-hour "warning strikes" as talks made little headway.
Union chiefs threatened an indefinite strike if their demands were not met, something that has not occurred in the sector since 2003.
With the focus on the union's unprecedented working time vision, their opening demand for a six-percent salary increase received less attention.
In the event, the two sides agreed a compromise of a 4.3-percent salary increase from April, with some additional one-off payments.
The deal "does justice to the outstanding economic position of the sector and will have a positive effect on the whole economy" by strengthening domestic demand, IG Metall chief Hofmann said.
But employers' leader Wolf said combined with the complex working time agreement, the wage increase would be "difficult to bear" for some firms.
With the increased pay packets agreed for 27 months, "it is not the start of an upward wage-price spiral in Germany," commented analyst Carsten Brzeski of ING Diba bank.
Some observers had suggested a muscular pay increase in Germany could help stoke inflation across the 19-nation euro single currency area, which the European Central Bank has struggled to steer towards its target of just below 2.0 percent.
The metalworkers' deal is, however, certain to be picked over in detail by other labour groups including civil servants, whose contracts are up for renegotiation in the coming months.