President Barack Obama will travel to India in January for celebrations marking the country's Republic Day.

The White House announced the trip shortly after Indian Prime Minister Narendra Modi took to Twitter to invite Obama to be the chief guest at the events in New Delhi. The White House says Obama is the first U.S. president to attend Republic Day, which commemorates the adoption of India's constitution.

Obama hosted Modi at the White House in September, nearly a decade after Washington rejected his visa request to visit the U.S. That decision came three years after religious riots killed more than 1,000 Muslims in the state of Gujarat, where Modi was the top elected official.

This will be Obama's second trip to India as president. His first visit came in 2010.