Muhammad Arif Naharudin, 20, and Muhammad Amin Mohamed Yunus, 21, had been trained by Jemaah Islamiyah (search), a militant group which seeks to establish a pan-Islamic state in Indonesia, Malaysia and the southern Philippines, the ministry said.
They were members of an elite cell in Pakistan that was started by former Jemaah Islamiyah operations chief Hambali, a ministry statement said.
"The cell was set up in 1999 by ... Hambali for the purpose of developing young members to become ... future leaders in the Jemaah Islamiyah," it said.
Hambali, whose real name is Riduan Isamuddin, is alleged to have had close ties with Usama bin Laden and was arrested by Thai and American intelligence officials in August outside of Bangkok. He is being held in an undisclosed location.
He is accused of planning the October 2002 attacks in Bali that killed over 200 people and the Jakarta Marriot bombing in August that killed 12.
The ministry said Arif was arrested Oct. 23 and Amin two days later.
Amin received training in urban warfare, surveillance and explosives at an Al Qaeda camp in Afghanistan, the statement said, and fought the American-led coalition when it invaded in October 2001.