JACKSON HEIGHTS — A Queens gas station owned by a taxi tycoon is refusing to sell gas to anyone but yellow cabs — with preferential treatment for his own drivers — even as desperate motorists line up for blocks to get fuel amid a massive shortage caused by Hurricane Sandy.

On the eve of Mayor Michael Bloomberg's mandatory gas-rationing plan, a Shell station on Northern Boulevard and 71st Street was giving away a seemingly endless supply of gas — mainly to members of taxi mogul Evgeny Freidman's taxi fleet.

Freidman's gas station had three working pumps on Thursday and has been flush with gas in the wake of the hurricane, even as dozens of others around the five boroughs ran dry and closed, sparking massive lines.

The station waved away at least five pleading motorists trying to fill up at the pump within an hour that evening while yellow cabs flew through the line and filled up, as officials from the city's Taxi and Limousine Commission stood by and watched.

"We're just here to provide security," said a TLC official, who turned up at the station at 5 p.m. Thursday, along with several NYPD officers, after getting "hundreds" of 911 calls about fights at that station.

Two pumps were reserved for Taxi Club Management, Freidman's massive fleet of cabs. All other cab drivers, who had been turned away from the station until the TLC intervened Wednesday, had to wait in two-block-long lines to use the third pump, even when the Taxi Club lines were empty.

The scene came as the city rolled out a controversial odd-even gas rationing plan gas rationing plan, only allowing those whose license plate ends in an even number to get gas on even-numbered days, and those whose license plate ends in an odd number, a letter or another character to get gas on odd-numbered days.

The order does not apply to taxis or livery vehicles, because they are a part of the "public transportation system," city officials said Thursday.

Police who were briefly on hand at the Jackson Heights station Thursday directed traffic and tried to keep order, telling one angry driver waiting in a long line that there was nothing he could do because it was a private facility.

"If you're serving the public, you should serve the public at all times," Maribel Egipciaco, 52, who waited in line for 15 minutes before an attendant came out and shooed her away.

Egipciao added that she plans to boycott the station long after the gas situation returns to normal, and recommended others do the same.

Freidman, who has 232 medallions, the most owned by anyone in the city, according to Crain's, defended his tactics.

"It's my gas that I'm paying a ridiculous amount of money for," said Freidman, adding he's been shipping the gas in from places like Boston and New Hampshire, "I think we're providing an essential service for taxi cabs."

Gas at the station was going for $4.50 a gallon for drivers not in Freidman's fleet, with a maximum purchase of $40.

Freidman, 41, emigrated to the United States from the Soviet Union in 1976, according to Crain's New York Business, and became giant of the taxi industry who owns one of the city's largest fleets, Taxi Club Management, Inc.

His cab companies include: 28th Street Management, which is based in Chelsea; the Queens-based garage Woodside Management; Downtown Taxi Management, which is based in Park Slope; and Tunnel Taxi Management, which is based in Long Island City.

Drivers had other words for the lockout.

Woodside resident Will Wade-Pentel, 25, was driving around on Wednesday looking to fill up his parents' car. He waited for 15 minutes, and the car was below a quarter-tank of gas when he was turned away.

"The subways are back," Wade-Pentel said. "There doesn't seem like any reason to be doing this 'taxis only' rule."

Cab driver Maurice Jiminez, 43, who said he drove as far as Westport CT in search of gas, was among one the drivers turned away by attendants at Freidman's Shell station.

"They asked me 'what garage do you belong to?' and I knew what was happening," said Jiminez, who does not drive for Taxi Club. "They were basically just supplying their [fleet of] cars with gas."

A TLC spokesman said the agency was aware of the station, and confirmed that they had dispatched a detail of 8 TLC officers and supervisors to the site Thursday night after police requested help with crowd control.

TLC spokesman Allan Fromberg said he was not aware of any other stations where the TLC had to become involved in a similar manner.

He added that agents were there purely for crowd control, not to stop private drivers from getting gas.

“It would not be our role to turn people away,” he said.

He said he wasn't sure whether that station is typically reserved for cabs — but said his understanding was that the owner uses it mostly to service his own fleet.

He added that the TLC distributed free gas to livery cabs and yellow cabs at Floyd Bennett field from 9 p.m. Thursday night to 6 a.m. Friday. The TLC also has a facility in Woodside, a few blocks from Freidman's station, where cabbies can also fuel up for free, officials said.

Fromberg noted that a single cab can transport as many as 70 passengers in a given day.

The spokesman said that he was unaware of any other station refusing service to locals while selling gas to cab drivers.

A TLC official asked the attendants Thursday if they could let the other cabs use the open pumps, to no avail.

"I was just saying to this guy, 'Why can't you open the rest of these to serve these cabs faster?'" the official said.