The ongoing investigation into the killing of journalist Jamal Khashoggi at a Saudi consulate in Istanbul earlier this month places a renewed focus on espionage between countries.

Turkish intelligence officials told The Washington Post earlier this month that recordings from inside the consulate show Saudi operatives detained the dissident Saudi journalist on Oct. 2, killed him and dismembered his body. Those officials are wary of releasing the recordings for fear of revealing too much about their intelligence-gathering operations. CIA Director Gina Haspel reportedly heard the recordings on a trip to Turkey this week.

But the investigation into Khashoggi's death is hardly the first widely reported instance of countries spying on each other, even among allies. Such practice is a reality and in many cases, experts say, a necessity.

"If you want to survive, you're going to take advantage of the kind of intelligence target that embassies are. It would be dumb not to," says Vince Houghton, historian and curator with the International Spy Museum in Washington, D.C. "Any country that is ignoring the potential intelligence information coming out of embassies is doing so at their own peril."

The documented history of spying on embassies and diplomatic functionaries is almost as old as diplomacy itself, and the motivations are varied. Sometimes a country may spy on its enemies or rivals to better understand how to defeat them. Allies may also spy on one another to learn more about their motivations or gain an advantage amid friendly negotiations.

What follows are other examples of major powers spying on diplomats and, as Houghton points out, just the ones that were discovered:

The Great Seal of the United States

In this May 26, 1960, photo, U.S. Ambassador to the U.N., Henry Cabot Lodge, shows the U.N. Security Council a listening device which he said the Soviet authorities planted in the office of U.S. Ambassador Llewellyn Thompson in Moscow. (John Rooney/AP, File)

Houghton calls this incident "arguably one of the greatest signals intelligence operations in history," if not the single greatest, referring to the method of intercepting broadcasts, either from human conversations or in electronic format. In the aftermath of World War II in which the U.S. and the Soviet Union fought as allies, leaders in Moscow presented to then-U.S. Ambassador W. Averell Harriman a carved wooden great seal of the United States of America as a gesture of friendship. They told him it was hand-carved by schoolchildren and emblematic of the two nations' successful cooperation against the Nazis. Harriman hung it in his residential office, and it remained somewhere within subsequent ambassadors' formal rooms until 1952, when by accident it was discovered to house a listening device.

It was considered a massive coup for the Soviets in understanding American policy at a particularly critical period that included the Berlin Airlift, negotiations over the Truman Doctrine and the Marshall Plan, the rise of communism in China and the development of new American national security and defense policies such as the top secret document NSC 68, a policy paper that helped develop the U.S. militarization of the Cold War.

The New U.S. Embassy Facility in Moscow

U.S. Embassy building in Moscow is shown in 1989. (AP)

Construction ceased on a new U.S. embassy facility built during the 1960s when it was discovered that Soviet agents had successfully planted listening devices within the rebar and concrete, among other building materials. The extent of the bugging was so extensive that the U.S. ceased construction and brought in their own materials to begin building another facility elsewhere, leaving the original site to stand derelict for decades.

Lancaster House

The British Secretary of State to the colonies Ducan SANDYS (standing) opening the conference on the independence of Zanzibar at Lancaster House in Great-Britain in September 1963. (Keystone-France/Gamma-Keystone/Getty Images)

The end of World War II signaled a marked shift for Great Britain, beginning a series of negotiations with countries that had previously existed as a part of its empire and would subsequently become independent.

Many of those talks took place at Lancaster House, a Georgian mansion in the West End district of London and a venue in which visitors thought it was safe to speak openly within their delegations about their intentions.

It was not.

"The British and the Americans bugged it to try to get a leg up on on what direction these colonies, now independent countries, would go in the Cold War," Houghton says. "Talk about breaking diplomatic norms. That's about as good as it gets."

The Tunnel

The Russian Embassy in Washington in 2001. The FBI and the National Security Agency constructed a secret tunnel under the embassy in the 1980s to eavesdrop. (Kamenko Pajic/AP)

American diplomats were incensed in the aftermath of discovering the Soviet bug within the great seal, and regularly called out counterparts in Moscow for it. But Americans conducted similar operations during the Cold War.

"Operation Monopoly" was run jointly by the National Security Agency and the FBI in the 1980s against the new Soviet embassy, built on a hill above the posh Georgetown neighborhood in western Washington, D.C. with clear lines of sight to the White House and the Capitol buildings. American agents bought and rented houses nearby to both surveil the embassy and to serve as a base for a tunnel they dug underground and toward the Russian facility, hoping to tap into their communications and planting listening devices.

The plot was uncovered as a part of the leaks orchestrated by former FBI agent Robert Hanssen, who sold thousands of pages of documents to the KGB before he was discovered and arrested in 2001. He is currently serving consecutive life sentences for 15 counts of espionage in what the Justice Department later categorized as "possibly the worst intelligence disaster in U.S. history."

The Washington Naval Conference of 1922

The interior of the Pan American Union Building, prior to the Washington Naval Disarmament Conference following World War One, Washington D. C., circa 1921-1922. (Keystone View Company/FPG/Getty Images)

The history of the U.S. spying on diplomats is not limited to operations against its enemies. One of the first documented signals intelligence operations took place at the Washington Naval Conference in 1922 when then-allies the U.S., Britain and Japan were determining what size their respective navies should be.

An American intelligence cell and the forerunner to the NSA known as the Black Chamber successfully decrypted Japanese messages to provide the U.S. a better negotiating position against its allies.

Then-Secretary of State Henry Stimson shut down those types of operations during his tenure in the late 1920s, saying notoriously, "Gentlemen do not read each other's mail."

"At the time," Houghton says, "there was a feeling that this was outside the limits, outside the rules. But everyone on the intelligence side was saying, 'We need to keep doing this. It would be stupid for us to stop.'"

All The Operations That Will Never Become Public

Embassies are natural targets for any country's intelligence operations, Houghton says. Officials and ambassadors inside are generally discussing their host country and policies affecting it, frequently in conversations with top decision-makers back home. Intelligence agents often pose as diplomats with a cover job at the facility to mask their operations, so attempting to learn more about their activities provides not only a way to conduct counter-intelligence, but also potentially to recruit them as double agents.

These documented incidents became public knowledge because something went wrong. Yet many other countries, like Israel or China, have equal motivations and opportunities to conduct similar operations.