Four years ago, a city detective in Jacksonville, N.C., decided to run out of town a man named Eugene Enslin, the manager of a massage parlor and pornographic bookstore, under a state law making it a felony to commit "the crime against nature, with mankind or beast . . ."

In what the detectives, Sam Hudson, has testified was "a deliberate and planned effort on my part . . . to set Mr. Eslin up so that I could prosecute him for homosexual conduct," he managed to recruit a 17-year-old non-homosexual Marine, stationed at Camp Lejeune nearby, to commit sodomy.

The effort secceeded: Enslin was run out of the coastal city of 16,000 and into the New Hanover County Prison Unit, where, in 1976, he served five months of a one-year sentence.

In doing so, however, Hudson inadvertently launched a case, now pending in the Supreme Court, that challenges the constitutionality of laws in nearly all the states that make sodomy a felony when engaged in by consenting adults in private.

Last June, a divided court invalidated a New York State ban on the sale of contraceptives to persons under 16. In the opinion for the majority, Justice William J. Brennan Jr. wrote that "the court has not definitively answered the difficult question whether and to what extent the Constitution prohibits state statues regulating" private, consenting sexual behavior among adults. "We do not purport to answer that question now," he added.

In biefs petitioning the court to overturn a November 1977 ruling by the 4th U.S. Circuit Court of Appeals upholding Enslin's conviction, his counsel argued that the time has come for the question to be answered.

The lawyer cited conflicting decisions in lower courts and the resultting uncertainty, which causes "great anxiety . . . among millions of homosexuals, whose rights of liberty and privacy in the most intimate aspect of their lives are cast in doubt."

The effort to prosecute Enslin got under way when Hudson chose the young Marine, Herbert P. Morgan, as "the right mant" - a phrase the detective used in testimony at Enslin's trial in Onslow County Superior Court.

On June 7, 1974, Morgan went to the adult bookstore. He told Enslin, whom he had never met, that friends at the Marine base had told him to see Enslin if he wanted some "extra excitement." And that was what Enslin, telling Morgan he was gay, then offered to provide.

Morgan, ostensibly taking time to consider the offer, left to get guidance from Hudson, who was hiding in bushes with binoculars to watch what was happening. The detective told Morgan to acept the offer.

Hudson couldn't witness the act itself. It took place in Enslin's living quarters behind the bookstore - a windowless room - with Morgan's admitted consent.

Predictably different interpretations were put on the facts by defense counsel, principally the American Civil Liberties Union, and by the state.

In its brief in the appellate court, for example, the ACLU implied that Enslin was arbitrarily singled out for prosecution by emphasizing Hudson's testimony that he knew of no arrests of other homosexuals in Jacksonville during the eight years he had been on the police force.

In cotrast, the state distinguishes Eslin from the handful of other known homosexuals who are consenting adults engaging in sex in the privacy of their homes. Enslin, the state says, had been warned repeatedly against making pick-ups.

The prosecution acknowledged Hudson's "deliberate and planned effort," but said the defense brief omitted this testimony by Hudson: "I have advised him if he did not stop this [sic] illegal movements that I was going to get him, yes, sir . . ."

Similarly, the defense emphasized Morgan's testimony that he was an adult who had consented to perform sodomy with Enslin, that no force was used, and that no money had changed hands although Morgan had been prepared to pay Enslin with marked bills.

Enslin does not make a claim of illegal entrapment. Such a claim was made extremely difficult to sustain under a 1976 Supreme Court decision.

The state's brief in the Supreme Court characterizes Enslin's behavior as "pandering of homosexual favors to minors." Under state law, however, Morgan was an adult, Enslin's counsel says.

The case in the Supreme Court for the second time. Initially, Enslin unsuccessfully appealed his conviction in the state courts, and the high court let the conviction stand. He then sought relief in the federal courts, losing at both the trial and the appellate levels before filing the pending petition for review.

The ACLU and Enslin's current counsel, the Lambda Legal Defense Education Fund of New York City, contend that the liberty protected by the 14th Amendment to the Consitution prevents a state from interfering with the private sexual life of consenting adults.

The federal trial court and the 4th Circuit held that this argument was foreclosed in 1976, when the Supreme Court affairmed without comment a conviction under a Virginia sodomy law similar to North Carolina's.