A federal judge has tossed a lawsuit seeking to block free public Wi-Fi stations rolling out across the city.

Pay-phone vendor Telebeam sued in 2014, claiming New York City violated the City Charter and the Federal Telecommunications Act when it awarded the contract to Telebeam competitor

CityBridge to develop the LinkNYC network.

Telebeam was resisting having to transfer to CityBridge the 1,300 pay phones that Telebeam still operated.

The city is currently working on replacing 6,000 public pay phones with Wi-Fi hot-spot hubs.

In a lengthy ruling, Brooklyn federal court Judge Nina Gershon found the city was within its rights to award the contract and didn’t break any laws.

City Corporation Counsel Zachary Carter said: “Now that this legal obstacle has been removed, the city’s good work towards establishing a more equitable and connected city can proceed unimpeded.”

Telebeam, which serviced the city for years, said it plans to appeal.