WASHINGTON — The first U.S. senator to face bribery charges in nearly four decades goes on trial Wednesday in a case that could affect the Senate's partisan makeup and the fate of President Donald Trump's legislative agenda.

Robert Menendez, a Democrat in his 12th year as a senator from New Jersey, is charged with using his influence to do favors for a Florida eye doctor accused of overbilling Medicare. In return, prosecutors say, the doctor treated Menendez to "a lavish lifestyle that included private jet rides and vacations in Paris and the Caribbean."

Menendez has insisted that he was simply trying to help someone he's known for years. "Prosecutors at the Justice Department don't know the difference between friendship and corruption," he said when the charges were filed in 2015.

Sen. Robert Menendez, D-N.J., with a portrait honoring Spanish general Bernardo de Galvez at the U.S. Capitol. Office of Senator Robert Menendez

The trial will also test what remains of federal corruption law after the U.S. Supreme Court weakened it last year. In throwing out the conviction of Robert McDonnell, a former Virginia governor accused of accepting bribes, the justices narrowed the definition of official bribery.

Prosecutors say the Florida doctor, Salomon Melgen, used his private jet to give Menendez 10 flights to and from the Dominican Republic, where Melgen owned a luxury resort and hosted the senator, all at no charge. In 2010, the government says, Melgen paid the bill when Menendez and a guest stayed in a suite at a five-star Paris hotel.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But prosecutors say Menendez didn't report any of Melgen's gifts on yearly financial disclosure reports.

The charges also say Melgen gave $20,000 to help Menendez pay legal expenses from a recall effort and contributed more than $750,000 to political entities supporting the senator's re-election.

In return for these favors, according to the charges, Menendez personally and through members of his staff urged regulators at the Department of Health and Human Services to drop its claim that Melgen fraudulently overbilled Medicare by nearly $9 million.

Prosecutors say Menendez also helped a Melgen-owned company deal with the federal government to maintain a contract for port security in the Dominican Republican and leaned on the State Department to approve visas for travel to the United States by three of Melgen's girlfriends.

Dr. Salomon Melgen arrives at U.S. District Court in Newark, New Jersey, on April 2. Eduardo Munoz / Reuters

Lawyers for Menendez say, however, that none of what he did qualifies as quid pro quo corruption under federal bribery law, because Menendez never agreed to perform any specific act when he received favors from Melgen. They argue that Menendez was trying to help a political supporter, and there's nothing illegal in that.

In April, Melgen was convicted in a separate case of defrauding Medicare. His sentencing has been delayed until after the Menendez trial, in which he's a co-defendant. Melgen is 62 and could face up to 20 years in prison on the fraud conviction.

The jury trial in Newark is expected to take up to eight weeks, and Menendez asked for court to be adjourned on days when there's an important Senate vote. But Senior U.S. District Judge William Walls rejected the request in a sharply worded order, saying the court "will not serve as concierge to any party or lawyer."

The judge said he was applying the well-established principle that "no man in this country is so high that he is above the law."

If Menendez is convicted, he would likely resist any calls to resign. If he were to step down this year, his successor would be appointed by New Jersey's current governor, Chris Christie, giving the Republicans an additional Senate seat — which could be key to passing White House-backed Republican health care legislation that failed by one vote. If Menendez were to resign after Jan. 16, the appointment would be made by the state's newly elected governor, likely to be a Democrat.

The Senate could also vote to expel Menendez if he were convicted. But that takes a two-thirds vote, and no senator has been expelled in the last 155 years.

The legal trouble for Menendez actually began in 2012, when a conservative website, The Daily Caller, claimed that he had gone to the Dominican Republic to have sex with underage prostitutes. That report turned out to be false, and Menendez suggested that the story was planted by the Cuban government because of his harsh criticism of the regime of Fidel and Raul Castro.

After looking into the allegation, the FBI began building the current case that has put the senator's political career in jeopardy.