While the world has been focused on military action in Libya, a major breakthrough in the war on terror took place in Pakistan. The highest-ranking terrorist to be captured alive since Barack Obama took office was taken into custody by Pakistani authorities recently — and his capture poses a major test for the Obama administration: Will the president insist that this high-value terrorist be taken into U.S. custody for interrogation? The answer will tell us how serious Obama is about stopping the next attack.

The captured terrorist is Umar Patek, a senior commander of al-Qaeda’s Southeast Asian affiliate, Jemaah Islamiyah, and one of the most wanted terrorists in the world. Patek was field coordinator for the 2002 Bali nightclub bombings and the last at-large member of the notorious Hambali network that collaborated with Khalid Sheik Mohammed on a planned “second wave” of attacks on America after Sept. 11, 2001.

After the terrorist known as Hambali and his gang were captured in 2003 (thanks to information from KSM and other terrorists interrogated by the CIA), Patek fled Indonesia and took refuge in the southern Philippines, where he linked up with Islamic terrorists and ran a terrorist training camp. The United States had offered a $1 million reward for his capture.

Patek is a potential intelligence gold mine. A former U.S. senior intelligence official told me that he is precisely the kind of high-value terrorist who would have been taken into CIA custody for questioning during the Bush administration. But President Obama has eliminated the CIA’s interrogation program and closed the agency’s black sites. How will the president handle the disposition of this captured terrorist operative? Where will Patek be detained? And who will interrogate him?

A senior Pakistani intelligence official told Reuters over the weekend, “We are going to hand him over to Indonesian authorities. There is no plan to hand him over to the Americans.” That would be a disaster for American national security. The only way to fully exploit the intelligence Patek possesses is for U.S. officials to interrogate him directly. Has the Obama administration requested that Pakistan transfer him to American custody? If not, why not? And if he were handed over to the United States, where would he be taken? Guantanamo Bay? The president needs to answer these questions — and fast — if we are to find out what this senior al-Qaeda commander knows about threats to the American homeland.

What might Patek tell us? It is significant that he was captured not hiding out in Southeast Asia but in Pakistan. There is only one reason an Indonesian terrorist with a million-dollar bounty on his head would risk traveling halfway across the world to Pakistan: to meet with al-Qaeda leaders. With whom specifically was he to meet?

Last year, CIA Director Leon Panetta said that aggressive attacks against al-Qaeda in Pakistan’s tribal region had driven al-Qaeda leaders into hiding and disrupted their ability to plan sophisticated operations. “It’s pretty clear from all the intelligence we are getting that they are having a very difficult time putting together any kind of command and control, that they are scrambling, and that we really do have them on the run,” Panetta said. Yet, senior terrorist operatives like Patek are still traveling to Pakistan to meet with top al-Qaeda leaders and discuss terrorist operations. Patek may be able to tell us a great deal we do not know about the current state of al-Qaeda’s leadership and its operational planning.

According to the International Crisis Group, there are credible reports that just before traveling to Pakistan, Patek was in Yemen. If true, what was Patek doing visiting the base of operations for al-Qaeda in the Arabian Peninsula (AQAP) just before going on to meet with al-Qaeda leaders in Pakistan? The Post recently reported that U.S. intelligence officials believe AQAP “may be close to launching a terrorist strike” against the homeland. What might Patek know about the location of AQAP leaders and their plans for new attacks?

To find out answers to these and other questions, Obama needs to make sure Patek joins his former bosses, Hambali and KSM, at the high-value detention facility at Guantanamo Bay. If the Army Field Manual’s techniques prove insufficient to break him, Obama should authorize additional interrogation methods so we can find out what he knows. Before he faces justice for his terrorist acts, Patek needs to tell us what he knows about future terrorist acts.

Will President Obama insist that he do so? If Patek knows al-Qaeda’s plans for new attacks, the decision to interrogate him directly may be the most important of Obama’s presidency.

Marc A. Thiessen, a visiting fellow with the American Enterprise Institute, is the author of the book “Courting Disaster” and writes a weekly column for The Post.