The only Asian in the fold, Barretto overcame the odds, including the weather and the talent-laden field as he dominated the gruelling three-hour race to win the event at the home of the German Formula 1 World Championships.
The 30-year-old Barretto, who made an impressive third-place finish in the qualifier, charged past the fancied Italian team Energex on his BMW M3 car on the third lap then showcased his driving skills by building a five-lap lead en route to the victory.
"The championship will be decided at Nogaro in two weeks time. It is a close fight among the top three contenders and we hope to come out on top," said Barretto.
Ulli Packiesen (BMW) finished third.
Barretto, putting the country in the world racing stage with hardly support back home, made his move as soon as the 50-car field passed through the first three long straights that make up a lap of Hockenheim as he found himself in third behind Austrian ace Thomas Jakobtisch (GTS Motorsport) and Beppe Gabbiani (Energex BMW).
Then in a daring maneuver into the first chicane, Barretto drove past the frontrunners and wrested the Group-N lead on the third lap before holding off his rivals in Porsches.
Barretto then took advantage of the situation as he used the less-powerful Porsches to give him a tow around the circuit while hiding in their slipstream at a speed of 260 kph.
Lap after lap, Barreto built up his lead, then handed the BMW to second driver James Seccombe of Britain, who substituted for his partner Matthew Marsh.