The men fled when other security officers arrived on site overnight Thursday, the Portuguese agency said, adding that the wounded officer's life was not in danger.
A string of attacks targeting diplomats and Libyan politicians have hit Tripoli. Earlier this week, Tunisian and Jordanian diplomats in Libya were kidnapped.
Diplomats in the Libyan capital say militias which fought to topple the Moamer Kadhafi regime in the 2011 uprising often carry out kidnappings in order to blackmail other countries into releasing Libyans held abroad.