The Oregon Lottery agreed last month to end a lucrative partnership that allowed retailers to sell Mega Millions tickets through an online company based in Malta called the Lotter.com.

Lottery director Barry Pack has sought to expand lottery revenue, which is already the state's second-biggest source of revenue after personal income taxes. Pack is working on sports betting, mobile gaming and partnerships with Native American tribes, but one innovation was already in place.

In 2016, the Lottery Commission formalized what had been a gray-market activity, granting the Lotter.com official permission to sell Mega Millions tickets online to buyers outside of Oregon. It quickly developed into a thriving business.

Since mid-September 2016, sales through the Lotter.com have totaled more than $14 million, according to Oregon Lottery spokesman Matt Shelby. That's more than 17 percent of the Mega Millions tickets the Oregon Lottery sold in that period and meant about $5 million in revenue for the state.

But last September, Gordon Medenica, lead director of the Mega Millions Group, a multistate consortium that runs the game, wrote to Pack saying Quebec lottery officials had complained about the Lotter.com selling Mega Millions tickets from Oregon in Canada. That, Medenica said, violated a new consortium rule against members selling tickets outside their jurisdictions.

Medenica told the Oregon Lottery to cease such sales. "Failure to comply with this warning may lead to other sanctions, including suspension from participating in Mega Millions," Medenica wrote.

Pack reluctantly complied, informing lottery retailers and the Lotter.com they'd have to cease business at the end of 2018.

Darian Stanford, a Portland lawyer who represents the Lotter.com, says that's a shame. Stanford says the company employed as many as 20 people to physically purchase the Mega Millions tickets for online buyers who lived outside Oregon. He says those buyers will continue to play lottery games despite the crackdown, except Oregon will no longer benefit.

Stanford applauds Pack's willingness to try new approaches and says the new Mega Millions rule prohibiting out-of-jurisdiction sales is shortsighted.

"It's a terribly written rule written by people who can't give a justification for it," Stanford says. "In the end, I think technology and the open market will win out."