Wall Street regulators have filed a civil lawsuit against former Rite Aid employee Steven Sheinfeld, alleging he sold $1 million worth of stock options before a merger with Walgreen Co. was delayed and ultimately called off.

In the suit, the U.S. Securities and Exchange Commission alleges that Sheinfeld, who worked in internal compliance, was privy to communications about a potential merger with Walgreens, a deal then facing tough antitrust scrutiny. By selling, he avoided about $155,000 in losses, the agency said.

“Mr. Sheinfeld vigorously denies the allegations,” said Amy Carver of the Center City law firm Welsh & Recker. “He is looking forward to the opportunity to defend himself in court and present his side of the story. We expect that he will be fully vindicated.”

Through his lawyer, Sheinfeld declined to comment.

Rite Aid Corp., based in Camp Hill, Pa., is one of the nation’s leading drugstore chains, with fiscal year 2018 revenues from continuing operations of $21.5 billion.

Rite Aid was scheduled to merge with Walgreens, another national drugstore chain, on Jan. 27, 2017.

In mid-January 2017, through his position at Rite Aid, relationships with senior Rite Aid executives, and work helping to prepare for the merger, Sheinfeld learned the deal was unlikely to win Federal Trade Commission approval in time, according to the SEC lawsuit, filed Thursday in federal court for the Middle District of Pennsylvania.

On Jan. 18, 2017, between 9:46 and 11:45 a.m., Sheinfeld sold all his 123,150 Rite Aid shares at prices ranging from $8.62 to $8.65 and netted $872,275 after paying $185,062 to cover the grant prices of his stock options, which ranged from $1.07 to $7.08 per share.

He also logged into brokerage accounts for two family members and sold their shares as well, the SEC alleges.

On Jan. 20, 2017, Bloomberg News published an article reporting FTC officials’ concerns that Walgreens and Rite Aid likely would not be approved for a merger by the Jan. 27, 2017, end date.

Rite Aid’s stock price fell, closing on Jan. 20, 2017, at $7.46 per share — about 13% lower than the prior day’s closing price.

On Jan. 30, 2017, Rite Aid and Walgreens amended the merger agreement, extending the end date to July 31, 2017, and lowering the price that Walgreens would pay to $6.50 to $7, down from $9 a share. Ultimately, the merger fell through.

Sheinfeld was privy to merger preparations, the SEC said.

In late 2015, Rite Aid and Walgreens had formed an “Integration Management Office,” staffed by teams of employees at each company who worked to join the companies.

Sheinfeld was not a member of the office, but starting in early 2016, he was asked to assist with matters relating to compliance or employee policies.

Rite Aid treated information about the merger as highly confidential, and all members were told at the outset that everything they would be working on was confidential, according to the suit. Sheinfeld was warned about the confidentiality of the office’s work in or about March 2016, when he began providing assistance.

As the merger date approached, Sheinfeld was tasked with figuring out how Walgreens’ “Day One” corporate policies would affect all Rite Aid employees. On Jan. 13, 2017, Sheinfeld complained to a colleague about his role on the Day One Policy Project: “I now have over 150 pages of policies (each policy is incredibly long) that have to be read and analyzed and it has to be done pronto. These policies all get sent to the many members of the Policy Oversight Committee for their immediate review as if they have nothing else to do.”

At one time a Pennsylvania resident in Mechanicsburg, Sheinfeld is now 67, according to the complaint, and living in Florida after working for the company since 1994. He retired roughly six months after the alleged trading took place.