NEW DELHI -- President Obama attended India’s Republic Day parade Monday, a stunning display of military might, lavish floats, dance performances, and daredevilish feats on motorcycles.

Obama attended as a special guest of Indian Prime Minister Narendra Modi. The invitation, offered after Modi visited Washington in the fall, underscores the desire of the two men to strengthen the relationship between the two countries.

If it had ever rained on Republic Day in India before, nobody could seem to remember when, or how much. But a gray cloud cloaked the sky and drizzle fell as Obama and wife Michelle took their places next to Modi in a special enclosure that was sumptuously decorated with flowers on the country’s central boulevard, Rajpath, to watch the parade. Rain dripped down the glass front of the enclosure.

Indian soldiers march during the Republic Day parade in New Delhi. (Adnan Abidi/Reuters)

The parade is an impressive display of military might, with most of the hardware made by Russia. It comes the day after the two countries announced an agreement in principle to pursue co-development of weapons. Modi and Obama also claimed to have made a breakthrough on nuclear issues Sunday and made progress on issues including climate change.

The reinvigoration of the U.S.-India relationship comes after decades of cordial but distant relations – especially during the Cold War, when India found had much closer ties with the Soviet Union than the United States. Obama is the first American president to be invited as chief guest and the first sitting president to visit India twice. A few mentioned how much they liked seeing the two leaders talk in the garden over tea on Sunday. “A Kodak moment,” said S.S. Reza, a retired Navy commander.

Helicopters and fighter jets flew overhead during the parade despite the overcast weather. A phalanx of military equipment rolled down Rajpath, including tanks and rocket launchers. Regiments of the Indian armed forces marched in formation, saluting with their heads turned toward the viewing stand. India's president, Pranab Mukherjee, stood, saluting back.

The camel contingent of India’s border security force marched past, the camels sporting elaborate red and orange saddles and garlands around their backs and heads that appeared to be made out of flowers. The contingent’s band -- the men sitting atop bright orange blankets on the backs of the camels, played instruments atop the animals.

Obama nodded as he watched the parade and smiled as he watched a group of children in blue uniforms. He clapped after another performance. He and Modi occasionally leaned in toward one another, chattting and gesturing. At one point Obama popped a piece of gum in his mouth. First Lady Michelle Obama smiled as a large group of children clad in shiny, bright jumpsuits performed a dance.

Indian Border Security Force (BSF) motorcycle specialists perform during the Indian Republic Day parade in New Delhi. (Roberto Schmidt/AFP/Getty Images)

The parade celebrates the adoption of the Indian constitution -- the day India became a republic. The invitation is one of the most important and symbolic in India. Republic Day is a national holiday, with most workplaces and stores closed, and the sale of alcohol is forbidden.

Each year the Indian government invites a different head of state to be the guest. Last year it was Japanese Prime Minister Shinzo Abe.

“It’s India’s most important formal invitation to offer,” said Alyssa Ayres, a senior fellow for India, Pakistan and South Asia at the Council on Foreign Relations.

The U.S. delegation, including White House Counselor John Podesta, National Security Adviser Susan Rice and members of Congress, including Rep. Joe Crowley, were shown sitting in green chairs and looked wet. House Minority Leader Nancy Pelosi had a brightly-colored scarf draped over her head and was seen snapping photos.

The massive floats, reminiscent of those at Mardi Gras or the Tournament of Roses Parade, represent India’s different states and some of its federal programs and ministries.

One float paid tribute to the Sultanpur Bird Sanctuary and had a massive bird, its wings flapping, at the front of the float. People with bird costumes around their waists walked alongside the float. Another on the Goa fishing industry had a large crab on the front, its claws moving. Another featuring a lion made out of gears, some of which moved, represented Modi’s “Make In India” campaign, which aims to turn India into a manufacturing hub. Many of the floats had dancers and regional music.

Indian artists perform during the Indian Republic Day parade in New Delhi on Jan. 26. (Prakash Singh/AFP/Getty Images)

The announcers provided dramatic commentaries in both Hindi and English throughout: the Indo-Tibetan Border Police were like “snow leopards” able to operate at temperatures way below freezing and altitudes above 18,000 feet, one of them noted.

Thousands of spectators suffered the rain and seemed genuinely excited about the friendship that appeared to be unfolding between the leaders of their two countries. the Indian media was appalled that the president was chewing gum. (A former smoker, the president has been known to chew nicotine gum.)

“We are so proud it brings tears to our eyes just watching, said Tarannum Reza, a resident of the Delhi suburb of Gurgaon who arose at 4:30 a.m. to make it to the parade on time. “We could see the prime minister and both of them together right across the way. It was wonderful.”

At the end of the parade, India’s national anthem was played, and planes flew in formation overhead. The commander of the last single plane did an upside-down loop in the sky as a finale, as someone in the stands unfurled a banner that said “We [Heart] Obama” as the guy next to him waved the Indian Tricolor flag. After that, the Obama descended the stairs to briefly mingle with the crowd, and balloons the colors of the Indian flag – orange, green and white – were released into the sky. Everyone stood on their chairs and waved frantically, hoping the president would see them.