The bribery trial of Sen. Robert Menendez began Wednesday with a federal prosecutor denouncing what he called a seven-year stretch of corruption in the service of a wealthy Florida eye doctor.

“This is what bribery looks like,’’ said Assistant U.S. Attorney Peter Koski in opening arguments at U.S. District Court in Newark. “These two defendants corrupted one of the most powerful offices in our country. The defendants didn’t just trade money for power, they also tried to cover it up.’’

Menendez (D) is accused of taking luxury trips, private jet rides and campaign donations from Salomon Melgen, a doctor in West Palm Beach. The two have spent years fighting the charges, saying their trips together were evidence only of their friendship, not crimes.

The prosecutor, in his hour-long speech to jurors, derided that defense argument.

“There’s no friendship exception to bribery,’’ Koski said. “Friends can’t commit crimes together. Friends can’t bribe each other.’’

Prosecutors allege that Menendez repeatedly pulled strings to help Melgen in a variety of areas: in getting his girlfriends U.S. visas, in trying to resolve the doctor’s $8.9 million billing dispute with Medicare, and in an effort to help Melgen’s efforts to make money from a port security contract in the Dominican Republic.

“Senator Menendez went to bat for Doctor Elgen at the highest levels of our federal government over the course of many years . . . because Melgen gave Menendez access to a lifestyle that reads like a travel brochure for the rich and famous,’’ Koski said. “Make no mistake about it — Robert Menendez was Salomon Melgen’s personal United States senator.’’

Since his indictment two years ago, Menendez has seen his political star dim, but he still has plenty of allies in the Democratic Party. Sen. Cory Booker (D-N.J.) attended the opening argument, and the two senators laughed and chatted during a court break.

Menendez, a senior New Jersey Democrat, has labored under the shadow of his indictment on corruption charges for more than two years.

“Not once have I dishonored my public office,” said Menendez on Wednesday morning as he arrived at the courtroom.

Prosecutors plan to call a wide range of witnesses — including jet pilots, former public officials and even members of Menendez’s staff — to paint a picture of what they say is a seven-year scheme between Menendez and Melgen.

“Although Menendez did not pay Melgen back for the lavish gifts in money, he did pay him back using the currency of his Senate office to take official action to benefit the South Florida doctor,’’ prosecutors wrote in a court filing last week.

In response, Menendez’s lawyer called the prosecutors’ filing a “lengthy, lurid and one-sided narrative of the case’’ that could improperly influence jurors, and urged the judge overseeing the case to question jurors about it.

The senator and the doctor have long denied wrongdoing, saying what prosecutors see as corruption were vacations taken by two friends.

The benefits of that friendship, according to the indictment, included stays at exclusive spots in the Dominican Republic, and a stay at a Paris hotel that cost more than $1,500 a night.

Melgen was convicted in April of defrauding Medicare, but prosecutors say they don’t plan to tell the Newark jury about that conviction “unless the defense opens the door.’’

The last time the Justice Department sought to convict a sitting U.S. senator, they won a conviction only to see the case blow up spectacularly months later amid allegations of prosecutorial misconduct. In that case, Sen. Ted Stevens (R-Alaska) was convicted in 2008, subsequently lost his reelection bid, and then saw his verdict tossed out of court at the request of the Justice Department.

“The last time they indicted a senator, it didn’t end well, so all eyes are on the Department of Justice now to make sure the mistakes aren’t repeating,’’ said Randall Eliason, a law professor at George Washington University. Eliason said the case will force jurors to “define the line between friendship and corruption.’’

“You certainly have politicians who have donors and supporters and who go out and try to do favors for those donors and supporters,’’ he added. “What makes this different? The key issue is going to be proof of corrupt intent. Was there a corrupt deal? Was there a quid pro quo?’’

The trial is expected to last up to two months, and will likely feature testimony from former Obama administration officials who say they were pressured by Menendez to help Melgen.

If convicted on some of the dozen charges against him, Menendez faces the possibility of a lengthy prison sentence. But how and when he might leave the Senate if he is found guilty could have major ramifications for legislation, in a year when a single Senate vote can tilt the balance on major bills.

If Menendez leaves office before Jan. 17, 2018, New Jersey’s Republican governor, Chris Christie, can appoint a temporary replacement. That could give Republicans an added advantage on a range of issues, including any renewed attempt to repeal Obamacare. But expulsion is not automatic, even for a convicted senator, and Menendez could try to stick around long enough to outlast the governor.