WASHINGTON — Eager to avoid any setbacks that would distract the president’s attention from the U.S. economy in an election year, the Obama administration hopes to use a pair of summits with foreign leaders this weekend to develop some consensus around an international response to the European debt crisis and the war in Afghanistan.

The back-to-back gatherings bring together the leaders of eight of the world’s richest economies at the Group of Eight summit at the presidential country retreat at Camp David, followed by a larger meeting of 61 NATO members and other allies in Chicago.

The twin summits offer a test of President Barack Obama’s leadership at a time of great uncertainty in several of his administration’s core foreign policy challenges.

White House officials said Thursday that Obama, at Camp David, will share his vision of a comprehensive approach to containing the fallout from Greece’s ongoing financial meltdown, which gained urgency amid renewed fears this week that the country would pull out of the euro currency zone.

The administration has offered advice and technical assistance as European leaders tried to respond to the crisis with hefty infusions of bailout funds and inexpensive loans to struggling banks.

But fresh political turmoil in Greece, along with the election of a new French president, Francois Hollande, has reignited the debate over whether Europe should pursue a different course — and put pressure on the White House to consider a more aggressive U.S. intervention.

Before heading to Camp David tonight, Obama will meet at the White House with Hollande, whose campaign for economic stimulus to help contain the financial fallout by sparking growth has contrasted sharply with the views of German Chancellor Angela Merkel, who has led the push for stricter austerity measures.

Administration officials touted the Camp David summit as the largest gathering of world leaders ever at the presidential retreat.