Sen. Robert Menendez (D-N.J.) is accused of using his office to advance a friend’s financial interests in exchange for bribes. (Brendan McDermid/Reuters)

Federal prosecutors on Monday defended their two-year-long corruption investigation of Sen. Robert Menendez, saying they have found a “clear and unmistakable” pattern in which the New Jersey Democrat accepted favors in exchange for helping a wealthy patron.

The argument, contained in new court filings, reflected yet another escalation in the increasingly bitter battle between the powerful lawmaker trying to save his career and the federal prosecutors seeking to put him in prison — with each side accusing the other of dishonesty.

Last month, Menendez’s lawyers argued that prosecutors and FBI agents had lied to win the April indictment of the senator and that they would “stop at nothing” to bring him down — even digging into his sex life.

In the Justice Department’s filings, a team of public corruption prosecutors said they began scrutinizing whether Menendez was soliciting underage prostitutes at the resort home of eye doctor Salomon Melgen, a friend in Palm Beach, Fla., but instead found evidence that the senator was soliciting gifts from Melgen while misusing his public office.

Prosecutors don’t spell out precisely how the misconduct accusations were flawed but say the defense attorneys made misleading allegations “by relying on selective snippets of witness statements, omitting material evidence that contradicts their claims, and making creative use of ellipses in their quotations from the record.”

“The charges in this case are the result of an exhaustive, focused, and disciplined investigation by career prosecutors and professional law enforcement agents over the course of more than two years,” prosecutors wrote. The filings were signed by Peter Koski, deputy chief of the Justice Department’s public integrity section, who is overseeing the case.

The investigators found “repeated and substantial use of defendant Menendez’s power and influence to further the personal whims and financial interests of defendant Melgen,” the filing says. “No ordinary constituent from New Jersey received the same treatment, and the quid pro quo outlined in the indictment is clear and unmistakable.”

Kirk Ogrosky and Abbe Lowell, attorneys for Melgen and Menendez respectively, said they will file their response to the court in mid-September.

“We stand behind the motions and remain confident that both defendants will be vindicated,” the lawyers said in a statement.

Tricia Enright, Menendez’s spokeswoman, said prosecutors “tried to make up for weak allegations about public corruption” by impugning Menendez and Melgen with unproven allegations of prostitution and sex. The new filings, she said, “continue that refrain.”

The 14-count indictment accused Menendez of using the influence of his office to advance Melgen’s financial interests in exchange for luxury gifts, lavish vacations and more than $750,000 in campaign donations.

Prosecutors charged that Menendez, a former chairman of the Senate Foreign Relations Committee, twice intervened on the doctor’s behalf — first with federal regulators investigating Melgen’s Medicare billings and then when Melgen sought to secure a ­port-security contract in the Dominican Republic, according to the indictment.

Federal investigators began investigating Menendez in 2012 based on what now appears to be a fabricated claim that he patronized underage prostitutes when visiting Melgen at his resort home in the Dominican Republic.

The more than 400 pages of filings submitted last month by Menendez and Melgen’s defense attorneys pointed to a possible contradiction that threatens to undermine a central allegation against Menendez — that he lobbied top officials in the Department of Health and Human Services to help Melgen deal with the Medicare billing issue.

According to the defense documents, the lead prosecutor allowed an FBI agent to falsely testify to the grand jury that HHS officials were “perfectly clear” that Menendez had been seeking favorable treatment for his friend. In contrast, defense lawyers argued, internal FBI memos showed the officials saying that they couldn’t recall Menendez mentioning Melgen, and one said she wasn’t sure what Menendez specifically wanted.