Two moped dealers went to court against the town of Oak Bluffs Friday, claiming recent efforts by the selectmen to regulate their businesses violate state law and seeking an immediate order compelling the town to renew their licenses for the summer season.

The Hon. C.J. Moriarty, an associate justice of the superior court, agreed to set a hearing for next Wednesday on the request for a temporary restraining order and preliminary injunction. The hearing is at 3 p.m. in Dukes County superior court.

The complaint filed on behalf of moped company owners Jason Leone and Aguimar Carlos by their attorney Kelly Malone claims the town is acting arbitrarily and selectively in enforcing its moped bylaw, and harming the three town moped rental businesses: Ride-On Mopeds Inc., Island Hoppers and King of Rentals of MV­­.

Selectmen voted unanimously two weeks ago to deny the three dealerships waivers to a requirement that they have a test rack for training on the premises, leaving their annual license renewals in a state of limbo.

The test track is required under the town bylaw but has never been enforced until now. Selectmen made it clear that they were denying the waivers, not the licenses.

The flurry of court documents was filed Friday afternoon.

The complaint describes the town’s “selective enforcement of an unlawful bylaw that defendants are using as a pretext to deny the renewal of plaintiffs’ licenses to rent mopeds, the result of which is the immediate closure of plaintiffs’ businesses.”

The dealers seek an injunction to prevent the town from enforcing the training track requirement, and from refusing to renew their moped licenses. They also ask for a jury trial on the matter and seek attorneys fees and costs.

Two days before the complaint was filed, the Oak Bluffs selectmen held a meeting to approve written decisions on the moped test track denial, and to formally accept an earlier document from town counsel Ronald H. Rappaport that advised mopeds could not be completely banned but the training track requirement could be enforced.

The complaint filed Friday claims that the town’s actions violate laws which state that moped rentals cannot be banned, and that licenses have long been granted though selectmen were aware moped rental companies were operating without a test track.

It also notes that moped rental dealers have been under a spotlight since last summer, when a visitor was seriously injured in an accident while driving a rented moped.

And it makes pointed reference to the Mopeds Are Dangerous Action Committee, which had filed a formal complaint against the town earlier this year asking the selectmen to declare moped rental licenses null and void.

“In response, and in concert with MADAC and in direct contradiction to its custom and practice, stated intentions and prior actions, as well as [Mass general law], for the first time the selectmen refused to issue waivers to plaintiffs,” the complaint says.