An attack at an American military base in Mosul on Tuesday killed at least 22 people and wounded more than 60, among them American and Iraqi soldiers and American and foreign contractors.Brig. Gen. Carter Hamm, who briefed reporters from Mosul, gave no further details of the toll in terms of numbers of dead or wounded or their nationalities. ‘‘It’s a sad day in Mosul,’’ Hamm said, ‘‘but as they always do, soldiers will come back from that and they will do what they can do best to honor those who have fallen today and that is to see this very important mission through to a successful conclusion.’’Earlier, a short announcement from the military said the explosion, at a military dining hall, occurred at noon Iraqi time near the city of Mosul. The militant group Ansar al-Sunna took responsibility for Tuesday’s attack. More than 100 bodies have turned up in Mosul in recent weeks, as the country heads toward elections on Jan. 30. On Sunday car bombers struck crowds in Najaf and Karbala, killing at least 61 people in those two holy cities. Tuesday’s explosion came on the same day as a surprise visit to Baghdad by Prime Minister Tony Blair of Britain, who vowed that the war against the insurgents would be won and the elections held on time. The Prime Minister flew into the capital on a military aircraft and then, avoiding the roads that have been frequent targets in bombings and ambushes, boarded a helicopter that took him to central Baghdad, escorted by Apache attack helicopters. He held a news conference in the so-called International Zone, a fortified, heavily guarded walled compound for Iraqi government officials and foreign forces. The brief visit to the capital was not announced for security reasons. Blair used his visit, his first to Baghdad since Saddam Hussein was toppled in spring 2003, to symbolize Britain’s support for the national elections.Meanwhile, two French journalists held hostage in Iraq for the past four months were freed today, officials said. Prime Minister Jean-Pierre Raffarin informed the French Senate “with deep joy” that the two, Christian Chesnot of Radio France Internationale and Georges Malbrunot of Le Figaro newspaper, had been released.