Germany handed departing coach Silvia Neid the perfect send off by claiming women's football Olympic gold for the first time thanks to a 2-1 win over Sweden in front of a huge crowd at Rio's Maracana. Dzsenifer Marozsan's sweet strike and Lisa Sembrant's comical own goal put Germany 2-0 up early in the second-half before Stina Blackstenius gave Sweden a lifeline. Canada beat host Brazil 2-1 in Sao Paulo earlier Friday to claim bronze. With Brazil's men taking on Germany in their final, the boisterous home crowd roared on the Swedes in the final stages. However, it was to no avail as Sweden boss Pia Sundhage missed out on a third consecutive Olympic title after leading the USA to gold in 2008 and 2012. Victory handed Neid a golden goodbye in her last game after a hugely successful 11 years in charge, including wins at the 2007 World Cup and 2009 and 2013 European championships. And she claimed Olympic gold was the greatest of her long list of achievements as German boss. "Despite the other titles, this is something completely new. This is a new summit for German women's football," said the 52-year-old. "It is very easy for me to hand over the reigns. It is very different when you take the decision to leave yourself. "I am looking forward to the future. For 34 years I have been involved in women's football as a player and coach and now I want to do something else and learn other things." Sundhage, meanwhile, focused on the positives having landed Sweden's first ever women's football Olympic medal. "After 90 minutes the feeling is a little bit empty, but I said to the players after that we have won a silver medal rather than losing the gold." Sweden had been criticized, most notably by outspoken USA goalkeeper Hope Solo, for its defensive tactics in upsetting the world champion and Brazil in the previous two rounds on penalty shootouts. Germany went onto have the better chances in the first-half, though, as Melanie Leupolz headed over from close range before Anja Mittag somehow blasted wide with the goal gaping. Marozsan showed much more composure with the first opening of the second-half as the Lyon forward curled the ball beautifully into the top corner. Another Marozsan effort provoked Germany's second as her free kick came back off the post and Sembrant's panicked clearance sent the ball crashing back into her own goal. Sweden, having scored just three goals in reaching the final, finally showed its attacking abilities with a well-worked move finished off by Blackstenius five minutes later. Schough had a huge chance to equalize five minutes from the end, but some frantic German defending finally managed to hack the ball clear. Canada completed the podium as host Brazil lost for the second time in three days to miss out on a medal. Goals either side of half-time from Deanne Rose and veteran captain Christine Sinclair on her 250th international appearance silenced a passionate crowd and saw Canada defend the bronze medal it won in London four years ago. For Brazil, Beatriz's consolation strike 11 minutes from time broke a streak of over 400 minutes without a goal in four games.