The race is officially on.

Kevin Durant is an unrestricted free agent, declining his $31.5 million player option to return to the Warriors on Wednesday, ESPN is reporting.

His recruitment, which can begin Sunday at 6 PM, could be a showdown between the Knicks and Nets. Durant has spent time in the city since undergoing surgery on June 12 to repair his ruptured Achilles tendon. He is currently there with business manager Rich Kleiman mulling his free-agency future, according to ESPN. Durant’s brother, Tony, posted a photo on Instagram on Tuesday of Kevin using a scooter to get around the streets of New York City.

As The Post reported, the Knicks are willing to go all-in on Durant despite the injury, planning to offer him the max of four years and $164 million. The Nets are said to be the favorite to land Kyrie Irving, a close friend of Durant’s.

The Clippers and Warriors are also believed to be in the mix for the 10-time All-Star and two-time NBA Finals MVP, who will turn 31 in September and is likely to miss all of next season. He could be 32 by the time he’s ready to return.

The Warriors can offer Durant more than the other three teams, a five-year, $221 million deal.

Durant has been linked to the Knicks for quite some time. They were believed to be the favorite to land him, with the allure of the Garden, New York City and being the player to lift them to their first title since 1973 the biggest selling points. They do have $70 million in cap space, but if Irving signs with the Nets, it remains uncertain that the Knicks can pair another star with Durant.

In May, Kleiman said his client was undecided on his future, and that was before the Achilles injury and the Warriors losing to the Raptors in the finals without Durant.