RIO DE JANEIRO -- Rosie MacLennan won an Olympic title four years ago by really pushing the limits on the trampoline.

She showed Friday that playing it safer could still lead to victory.

MacLennan delivered an impressive mix of flips, twists and jumps in her final routine to outscore the competition at the Rio Olympic Arena, becoming the first Canadian summer athlete to successfully defend an individual Olympic title along the way.

"It feels incredible," MacLennan said. "I don't know how it compares but it's just absolutely amazing."

An underdog at the London Games, MacLennan had little to lose in 2012 and was rewarded for nailing a very difficult routine. She considered something groundbreaking for Rio but eventually decided to dial it back.

That turned out to be a wise call.

Opting to minimize the risk and go for a better execution score made her routine a little easier. It also allowed her to jump a little higher and display improved form.

"She did very close to a perfect routine," said head coach Dave Ross.

MacLennan earned 56.465 points to move into first place and put the pressure squarely on the two remaining competitors in the eight-woman final.

Reigning world champion Li Dan of China followed with a score of 55.885, taking bronze when Tatsiana Piatrenia of Belarus closed things out by settling for fifth place.

That result gave Britain's Bryony Page (56.040) the silver and MacLennan her second Olympic title.

"Unfortunately the rules don't reward for brilliance, they deduct for mistakes," said Ross. "And she just made the least mistakes. The other girls did some skills just as brilliantly as Rosie but they did a few bad ones and she didn't.

"So that's what set her apart."

Not bad for someone who nearly had her Rio plan derailed after a pair of head injuries last year.

MacLennan battled headaches, vision issues and occasionally mixed up her words. She took some time off and was eventually cleared to return, but her confidence needed to be restored.

When competitors jump 25 feet high in the air, the trampoline looks more like a postage stamp than a large mat. Razor-sharp focus and a steady belief in one's skills are requirements.

MacLennan said she finally felt like she was fully back to normal in March.

"In some ways it was really tough," MacLennan said. "But it was also a reminder of how much I really did love the sport. Because if I didn't, I would have given up."

There were pockets of Canadian fans in the 13,000-capacity venue, which was about three-quarters full for Friday afternoon's session.

MacLennan, 27, flirted with the outside padding during the second qualification round before finishing strong. Her form was virtually flawless in the final routine.

"I was a lot more confident in it," MacLennan said, a folded Canadian flag on her arm and a shiny medal hanging around her neck. "The other one was a little shaky and we knew it would be a bit of a gamble. And the Olympics isn't a time to gamble."

Prime Minister Justin Trudeau posted a tweet on his Twitter account shortly after her victory

MacLennan finished seventh in her Olympic debut in 2008. She won a world title in 2013 and took gold at last year's Pan Am Games in Toronto.

As Canada's lone defending Olympic champion, MacLennan was often in the pre-Games spotlight back home. That ramped up even more when she served as flag-bearer at last week's opening ceremony.

She handled it all with aplomb, becoming her sport's first back-to-back Olympic champion.

"I knew I was giving everything I had to give myself the best chance," she said. "I hoped I was capable of it. I just really wanted to keep pushing and to keep working."

Jason Burnett of Nobleton, Ont., is Canada's lone representative in the men's trampoline competition. The qualifying round and final are scheduled for Saturday.

Ross, who coaches MacLennan at their home club north of Toronto, described her as consistent, tough, focused and motivated.

But he has always been most impressed by her determination and the fact she always gives back.

"She's a very bright girl and she's really good with other athletes," Ross said. "She helps other athletes. It's not all about her. Little kids come up and she gives them pointers or she goes over and holds a mat for somebody else.

"She's completely the opposite of a prima donna. She's amazing."

Canada is the only country that has won at least one trampoline medal at every Summer Games since the sport made its Olympic debut in 2000.

MacLennan, from King City, Ont., plans to keep jumping next season and will see if she can master that routine she considered for Rio. She added that she'll keep going in her sport as long as she has "that joy."

"It's so fun. It's a perfect combination of power and beauty and strength and pushing your limits and trying new skills," she said. "There's always something to learn, there's always something new to conquer.

"You can keep pushing yourself. The limits are endless."