The 14-year-old American who made headlines after being arrested for bringing a homemade clock to school has met Sudanese President Omar al-Bashir.
Ahmed Mohamed and his family were received at a presidential compound in Sudan's capital Khartoum on Wednesday, according to state-run radio.
The Texan teenager was pulled out of class and handcuffed because a teacher mistook his clock for a bomb.
His arrest was sharply criticised and the police declined to file charges.
The boy's father, Mohamed Hassan al-Sufi, is a Sudanese immigrant to the US and a former presidential candidate who ran against Mr Bashir.
The Sudan leader is wanted by the International Criminal Court for alleged war crimes in Darfur, which he denies.
Ahmed said he was pleased to meet the president and vowed to return one day with a new invention, according to the radio broadcast.
He has also been invited to the White House by US President Barack Obama, who tweeted his support after the incident.
Nasa scientists and Facebook CEO Mark Zuckerberg also praised the boy's initiative.
The police rejected a suggestion by Ahmed's family that he was detained because he was Muslim.
Who Ahmed has met
- Google co-founder Sergey Brin
- Turkish Prime Minister Ahmet Davutoglu
- National Geographic Society CEO Gary Knel (above)
- Queen Rania of Jordan
- Mashable CEO Pete Cashmore