U.S. President Barack Obama will attend a Three Amigos leaders summit in Ottawa and address a joint session of Parliament on June 29, the White House confirmed Wednesday.

Obama had promised to visit Canada during Prime Minister Justin Trudeau's trip to Washington in March for a state dinner, and now Mexican President Enrique Pena Nieto is also expected to be in Ottawa for the summit that will immediately precede Obama's address.

Gov. Gen. David Johnston will host Nieto at an official state dinner, which will be followed by an event in his honour at the National Art Gallery. The Governor General's office confirmed the dates for Nieto's visit, June 27 to 29, in a statement Wednesday.

The meeting would be the first between Canada, the U.S. and Mexico in more than 2½ years.

Parliamentarians will also have to stay in Ottawa longer than previously thought to hear Obama's speech, as the House of Commons was expected to rise for summer break on June 23. The last U.S. president to address a joint session of Parliament was Bill Clinton in 1995.

Former prime minister Stephen Harper postponed the last North American leaders summit in January 2015 amid tensions over the Keystone XL pipeline, food labelling and a range of other issues.

Pena Nieto's visit to Ottawa is strictly dependent on Canada lifting its requirement that all Mexican visitors have a visa, a controversial measure put in place in 2009 to curb bogus asylum claims. That policy has strained relations between the two countries and led the Mexican ambassador to Canada to declare that he was "really mad" at the former Harper government for the move.

CBC News has learned that there has been significant progress on this file since the Liberal government's election, something Trudeau promised last summer in the lead-up to the Oct. 19 election campaign.

Foreign Affairs Minister Stéphane Dion was tasked by the prime minister with finding a solution to this problem in his ministerial mandate letter.