WASHINGTON — John McCain and Barack Obama have agreed to hold three presidential debates and one vice presidential debate this fall, the campaigns said in a joint statement Thursday that outlined formats, dates and locations.

The Commission on Presidential Debates will sponsor the events.

The first, on Sept. 26 at the University of Mississippi, will focus on foreign policy and national security, and McCain and Obama will answer questions from moderator Jim Lehrer while standing at podiums.

On Oct. 7, the two will meet again for a town-hall style debate at Belmont University. Moderator Tom Brokaw will call on audience members and pose questions submitted through the Internet.

The third presidential debate, on domestic and economic policy, is slated for Oct. 15 at Hofstra University. McCain and Obama will sit at a table with moderator Bob Schieffer.

Vice presidential contenders are to meet Oct. 2 at Washington University in St. Louis.