An Algerian identified as Nou Mediouni was arrested in Zaragoza, northern Spain, the interior ministry said.
The other suspect, a Moroccan named Hassan El Jaaouani, was arrested in Murcia in the south.
They have “a similar profile to the two suspects who carried out the Boston attacks”, the ministry said. French police had helped to track them down.
AQIM is among several Islamist groups fighting French and West African troops in Mali.
It has its roots in the bitter Algerian civil war of the early 1990s, but in 2007 it emerged as an international jihadist group linked to Osama Bin Laden’s network. AQIM says its aim is to spread Islamic law and it is known for kidnapping Westerners and extracting ransoms.
It is not clear whether the men arrested in Spain are suspected of planning any attacks. Their similarity to the Boston marathon bombers was not explained in the ministry statement.
Moroccan Islamists linked to al-Qaeda were found guilty of the 2004 Madrid train bombings which killed nearly 200 people and injured more than 1,800.
a0QOop0RE0AImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…