President Maumoon Abdul Gayoom was not hurt, but his shirt was ripped when the attacker tried to stab him before the boy and security guards intervened during the event on the small island of Horafushi, said government spokesman Mohammad Shareef.
"This fellow in the crowd with a knife in his hand attempted to stab the president in his stomach," Shareef said by telephone from Male, the capital. "But a 15-year-old boy came in the way, and grabbed the knife. One brave boy saved the president's life."
The scout was identified as Mohamed Jaisham Ibrahim, who had lined up to welcome Gayoom, according to the president's Web site.
The boy was injured in the hand by the knife. "His wound was stitched but later he complained that he could not move some of his fingers, so he was flown by a sea plane to Male," Shareef said.
"There was blood on the president's shirt, but it was not his but the boy's. Still we got a physician to examine him," Shareef said.
A photograph of the boy on the Web site of the Haveeru daily showed him wearing a blue scouting uniform with a blue kerchief around his neck waiting in line to greet the president.
Boy scouts in the Maldives are similar to their U.S. counterparts, receiving training in first aid and participating in activities such as camping. Like in the U.S., their motto is "Be prepared."
The attacker had wrapped the knife in a Maldives national flag as he stood among a crowd waiting for Gayoom, 70.
A police Web site identified the attacker as Mohamed Murshid, 20. No motive was given, and other details were not disclosed.
Shareef, speaking by telephone from Male, said the assassination attempt may have had a "political motive," but it was too early to say if Islamic militants were involved. Opposition to Gayoom's three-decade rule has grown in recent years and there have also been concerns about increased Islamic militancy in the Muslim nation.
After the attack, Gayoom addressed the nation by radio, thanking the teenager and calling for calm, according to the Web site of the Minivan newspaper.
"We should not resort to violence even if we have differences between the parties," Gayoom was quoted as saying.
Gayoom has ruled this Indian Ocean atoll of 1,190 coral islands since 1978 and helped turn it into a major destination for tourists seeking a quiet vacation on virgin beaches surrounded by crystal blue waters.
However, the country of 350,000 people has also had its share of turmoil in recent months.
On Sept. 29, a homemade bomb blamed on Islamic militants exploded in a Male park, wounding 12 tourists. A week later, police and soldiers raided an island that was a reputed insurgent stronghold, sparking a battle with masked men armed with clubs and fishing spears that wounded more than 30 security officers.
Some high school graduates in the Maldives have studied religion at extremist institutions in Pakistan and Saudi Arabia and spread their radical beliefs across the islands, according to Rohan Gunaratna, a Singapore-based terrorism expert.
While many of the fundamentalists were not violent, a Maldivian was caught trying to join the Taliban in Afghanistan, another was arrested in India seeking to buy sniper rifles, and a third was jailed by U.S. authorities in Guantanamo Bay.
Gayoom has also faced opposition protests to his previously unchallenged rule in recent years. Under the pressure, he legalized opposition parties and agreed to hold the nation's first truly democratic election later this year.
Meanwhile, New Maldives Movement, a new opposition coalition formed to challenge Gayoom's three decades of rule in upcoming elections, condemned the attempted assassination.
"The NMM calls for an independent and speedy investigation into the attack and stresses the importance of making the results of the investigation public," the group said.