Officers from Spain's Civil Guard discovered the two undocumented migrants on Sunday evening at the El Tarajal border crossing between Morocco and Spain's North African enclave of Ceuta.
Police became suspicious when the driver appeared agitated at the amount of time it was taking to cross the border.
Upon inspecting the vehicle, police discovered two migrants; one hidden in a secret compartment inside the engine casing and another in a compartment "practically under the vehicle's back seat" according to a statement released by the Civil Guard.
Both men, thought to be from Conakry in Guinea, were exhibiting "clear symptoms of fatigue and lack of oxygen" due to the heat and fumes in the areas in which they were hidden.
The men, identified only by their initials of T.D. and A.B. received medical treatment from the Red Cross, which often aids undocumented migrants attempting to enter Spain via Morocco.
The driver and passenger of the vehicle, two Moroccan men aged 23 and 29, were arrested and are currently facing charges.
Scenes of desperate migrants scaling the border fences that separate Morocco from the Spanish enclaves of Ceuta and Melilla have become all too common in recent months prompting the EU to urge Spain not to immediately deport migrants and process their requests so they do not have to scale the fences.
At the beginning of August a man from North Africa died after hiding inside a suitcase on a ferry bound for mainland Spain.
The man's brother drove the car, which boarded the ferry in Melilla heading for Almeria on Spain's southern coast.