This has become a common misperception, but nothing could be farther from the truth. Embassies are not the sovereign territory of the sending state; they are business offices protected under the 1961 Vienna Convention on Diplomatic Relations (the Convention).
The confusion arises from Article 22 (1) of the Convention which provides that The premises of the mission shall be inviolable. The agents of the receiving State may not enter them, except with the consent of the head of the mission. Article 22(3) further stipulates that The premises of the mission, their furnishings and other property thereon and the means of transport of the mission shall be immune from search, requisition, attachment or execution. Also, Article 29 provides that The person of a diplomatic agent shall be inviolable. He shall not be liable to any form of arrest or detention. The receiving State shall treat him with due respect and shall take all appropriate steps to prevent any attack on his person, freedom or dignity. Furthermore, Article 30 grants the private residence of a diplomatic agent, her/his papers, correspondence, and his property (except it is of a private commercial nature) the same inviolability and protection as the premises of the mission.
Inviolability does not mean that embassies, consulates and other protected buildings have been granted extra-territoriality. Despite their inviolable status, they remain the territory of the receiving states. The law simply suspends certain rights normally associated with the control of territory. Embassies do not have police or courts on the premises. Thus, if a crime is committed within an embassy, that crime occurs on the soil of the receiving state, not that of the sending state. If embassy personnel apprehend a burglar on the premises, they have no right to try and impose sentence. Instead, they must hand the offender over to the authorities of the host state for prosecution.