State Attorney General Letitia James on Friday launched an investigation into claims that builders of a luxury high-rise were responsible for the deluge that flooded a Long Island City subway platform Wednesday night — sweeping a man off his feet just as a train came in.

The indoor tsunami occurred amid a downpour, when a temporary wall erected at the Court Square station gave out, sending water gushing onto the platform and knocking the man to the ground.

“This is an incredibly dangerous situation that easily could have resulted in the loss of a life, and we need answers,” James said in a statement.

MTA officials pinned the incident on New Line Structures, which is constructing a building called the Skyline Tower just above the transit hub, and John Civetta & Sons, a subcontractor remodeling an entrance to the subway.

The agency accused them of allowing the site “to become inundated with water” during the storm and not having “the proper pumping system in place to act as a temporary drainage system.”

“I am deeply concerned that [these companies] may have created a treacherous environment for New Yorkers in this incident,” said James.

The AG’s move came in response to pleas from state Sen. Mike Gianaris, whose district includes the area.

“The incredibly fast pace of development that’s going on is stressing the infrastructure,” Gianaris told The Post on Friday.

The MTA did not receive any complaints from the man swept up in Wednesday night’s flood. The developer will be charged for any costs associated with the incident, according agency officials.

“This irresponsible action by the developer and contractor was unacceptable and avoidable and put lives at risk, we are outraged by it, and those responsible must be held accountable,” MTA Chairman Pat Foye said.

New Line Structures declined to comment. A rep for John Civetta & Sons was not immediately available for comment.