WASHINGTON (AP) — Imagine. The argument over President Barack Obama’s legal authority to defer deportations begins 42 years ago with a bit of hashish, a dogged lawyer and, yes, John Lennon and Yoko Ono.

President Richard Nixon was seeking re-election. “American Pie” was leading the pop charts. And Lennon, convicted in 1968 for possession of “cannabis resin” in London, was in New York facing deportation from a Nixon administration eager to disrupt the famous ex-Beatle’s planned concert tour and voter registration drive.

Lennon wanted to delay his removal so Ono could fight for custody of her 9-year-old daughter by a previous husband. Lennon and Ono approached Leon Wildes, a lawyer young enough that he shouldn’t have had to ask a colleague, “Tell me, who is John Lennon?” Wildes had grown up in a small town in Pennsylvania coal country, and “I was not into that kind of music,” he says.

But he knew his immigration law.

In time, the effort to extend Lennon’s stay in the United States would become an integral part of the legal foundation the Obama administration relied on in 2012 to set up a program that has deferred the deportation of more than 580,000 immigrants who entered the country illegally as children.

“All I can say is, John Lennon is smiling in his grave,” Wildes said in an interview. “He helped accomplish that.”

The extent of Obama’s legal authority is now central to the White House deliberations over what else Obama can do – and when – without congressional action to reduce deportations and give many of the 11 million immigrants living in the United States illegally the ability to stay and work without fear of being removed.

Until the Lennon case, the Immigration and Naturalization Service had not acknowledged it used its own discretion in deciding whom to deport. But through the Freedom of Information Act, Wildes discovered 1,843 instances in which the INS had invoked such prosecutorial discretion as part of a secret program for “nonpriority” cases.

Once the program was revealed, the INS had no choice but to concede its existence and issued official guidance on how it would be applied.

“The remarkable work of Leon Wildes really led to the old agency of INS making its policy about prosecutorial discretion and nonpriority status public for the first time,” said Shoba Sivaprasad Wadhia, a law professor at Pennsylvania State University’s Dickinson School of Law who has written extensively about executive powers in immigration law.

Immigration lawyers and many legal scholars like Wadhia argue Obama draws his authority to act from a broad range of sources, from the Constitution to immigration laws to government regulations.

Critics like John Yoo and Robert Delahunty, both of whom worked in the Justice Department’s Office of Legal Counsel during President George W. Bush’s administration, argue that the president doesn’t have such broad latitude and that prosecutorial discretion can only be applied narrowly.

For Wildes, now 81 years old and still at work on immigration cases, the years spent with John and Yoko were a defining time. (The “hold” music on his office phone plays Lennon’s “Imagine.”)

Like a good lawyer, he tried a variety of ways to lengthen Lennon’s stay.

The case attracted attention from the highest ranks of the arts, literature and film worlds. Andy Warhol, Stanley Kubrick, Jasper Johns, Elia Kazan, Bob Dylan and more signed letters attesting to Lennon’s and Ono’s place as major artists, and Wildes was able to extend their stay as “outstanding persons in the arts and sciences.”

But he wanted to go further and obtain U.S. residency for the couple.

He even attempted a novel approach. The law said convictions for possession of “narcotic drugs or marijuana” were grounds for deportation. Wildes asked Lennon whether cannabis resin, also known as hashish, was marijuana. “Oh, no,” Wildes recalled Lennon replying. “Much better than marijuana.” Wildes presented expert testimony that hashish was not marijuana and thus was not covered by the law. “While this argument has some technical appeal,” the Board of Immigration Appeals concluded, “we are not persuaded.”

In the end, Lennon won by obtaining a “nonpriority” classification.

“That discretion exists,” Wildes said. “Any agency which is so huge has to be concerned how they spend their money and what they concentrate on, and they shouldn’t be deporting people who are here for 25 years and never did anything really wrong.

“So that is the message that we got from representing John Lennon.”