Saji first took the exam in January and scored 99.99 but, because he was not satisfied, he sat for the test again in April
River took the lead through Rafael Borre after 14 minutes and looked to be cruising to their fifth Libertadores triumph.
However, Barbosa, the prolific striker nicknamed Gabigol, tapped in from close range with a minute left and then rifled home from 15 metres to secure victory in an astonishing finale.
Barbosa was sent off seconds before the final whistle after a fracas that followed a red card for River's Exequiel Palacios.
The result gave Flamengo only their second Libertadores triumph and means they will represent the South American confederation in the Club World Cup in Qatar in December.
"What a historic game," defender Rodrigo Caio was quoted as saying on the Globoesporte website.
"We never gave up at any point. We knew it would be difficult against a big team, the 2018 champions. We really struggled in the first half but we believed in ourselves.
"We're delighted to make history with this club, with this magical victory. We hope it's just the beginning."
The Rio de Janeiro side came into the match as slight favourites on the back of a spectacular 26-game unbeaten run.
But playing in their first Libertadores final since 1981, they appeared overawed and River Plate seldom looked like relinquishing their lead as they outplayed and outmuscled their less experienced rivals.
However, just when the match looked over, Barbosa popped up a minute from time to sidefoot home a close-range equaliser.
And in a finish reminiscent of Manchester United's last-gasp victory over Barcelona in the 1999 Champions League final, the 23-year-old striker pounced again in added time to hit the winner and send the Brazilian fans wild with joy.
"I feel proud," said shell-shocked River Plate coach Marcelo Gallardo. "For my players, for everyone who worked with me and for the River fans."
The final in Lima was the first to be played on a one-off basis at a neutral venue in the competition's 60-year history.
The match had originally been scheduled to take place in Santiago but was switched to Lima earlier this month because of political unrest in the Chilean capital.
The change came a year after the second leg of the final between River Plate and Boca Juniors was moved to Madrid after River fans attacked the Boca coach as it approached the stadium.
Saji first took the exam in January and scored 99.99 but, because he was not satisfied, he sat for the test again in April
Israel-Hamas conflict and humanitarian crisis in Gaza lit a match of shock and divisive outrage in American universities from New York to California
Issuance is spread across three maturity periods — five, 10 and 30 years
Twin towers span over a 794,000 square feet plot and offer 1,006 apartments
The International Monetary Fund forecast growth in the Gulf region to average 2.4% in 2024
The initiative operates on a smart response system which tailors bus availability to user demand
Hiring for the manufacturing, assembling facility to begin in few months
Key tips you should keep in mind when embarking on these tours