Although the alleged intruders were stopped by Bolivian police, Foreign Minister Karen Longaric said La Paz had complained to Madrid in a letter about its 'abuse' of diplomatic privileges.
Spain pledged Saturday to send investigators to La Paz after its embassy staff were accused of trying to sneak into the Mexican diplomatic mission with several masked individuals, an action denounced by Bolivia as a "violation" of its sovereignty.
Bolivia's foreign ministry said the incident occurred on Friday when "people identified as staff members at Spain's embassy in Bolivia, accompanied by people with their faces covered, tried in a secretive and underhand manner to enter Mexico's diplomatic residence in La Paz".
Although the alleged intruders were stopped by Bolivian police, Foreign Minister Karen Longaric said La Paz had complained to Madrid in a letter about its "abuse" of diplomatic privileges which constituted a "serious trampling of Bolivia's sovereignty".
The letter would also be sent to the European Union, the Organization of American States and the United Nations, Longaric said.
"Spanish embassy diplomatic and security staff in Bolivia are not authorised to carry firearms or wear attire that conceals their identity," she said, denouncing such acts as "contravening diplomatic practices".
The Spanish government said it would send ministry staff to investigate the incident which it said took place on Friday as Cristina Borreguero, its charge d'affairs in La Paz, was visiting the Mexican mission.
"The foreign ministry has agreed to open an investigation into the incidents which occurred during a visit by Spain's charge d'affaires to the Mexican embassy in Bolivia," it said.
"We are going to send people from the ministry in Madrid for the investigation," a ministry spokeswoman told AFP.
The Mexican mission has been at the centre of an ongoing diplomatic row with La Paz after it took in around 20 former top officials who served under ousted president Evo Morales.
Morales fled Bolivia last month after nearly 14 years in power following weeks of mass street protests.
The spat has seen Mexico accusing Bolivia's new interim government of "harassment and intimidation" for deploying a large contingent of police and intelligence officers outside the embassy.
Bolivia has been in turmoil since late October when Morales declared he had been re-elected following a disputed election marred by fraud. On November 10, after losing the army's backing, he resigned and fled to Mexico, and then to Argentina.