Keith Thurman returns to the ring after 22 months off and puts on a show with Josesito Lopez, as Thurman wins by majority decision. (1:32)

NEW YORK -- After 22 months out of the ring because of two significant injuries, welterweight world titleholder Keith Thurman made a triumphant, but sometimes shaky, return to the ring Saturday night at Barclays Center in Brooklyn.

Thurman looked sharp, fast and powerful for most of the fight but had some mid-fight problems in an entertaining majority decision victory over the game Josesito Lopez to retain his 147-pound world title for the fifth time.

Thurman scored a second-round knockdown, weathered a harsh storm in the one-sided seventh round and won by scores of 117-109 and 115-111 on two scorecards and 113-113 on the third in the main event of the Premier Boxing Champions on Fox card before 9,623. ESPN had Thurman winning 117-110.

"He came right for me," Thurman said. "I said you wouldn't see the best Keith Thurman tonight, but you'd still see a world-class performance, and I gave you that tonight."

Thurman (29-0, 22 KOs), 30, of Clearwater, Florida, unified world titles with a decision win over Danny Garcia, also at Barclays Center, in March 2017 and had not boxed since then because of postfight surgery on his right elbow. When his elbow had healed and he was just starting to begin working out again, he suffered a deep bone bruise on his left hand that extended his layoff even longer. It was because of the layoff that Thurman had to vacate the belt he won from Garcia, because he was unable to make a mandatory defense, and he came into the fight with Lopez having boxed only twice since July 2015.

Although Thurman had not boxed for almost two years, he had his rhythm and timing from the outset. He punched with authority with both hands, fired hard jabs and moved well.

Thurman had a big advantage in punches landed and thrown, according to CompuBox. He was obviously the harder puncher and landed 247 of 899 blows (28 percent); Lopez landed 117 of 513 (23 percent).

Thurman said he came out of the fight without the injuries flaring up.

"My hand took some contact tonight. Lopez had a tough head, but we held out strong," Thurman said. "I wish I had gone to the body more because I saw him breathing heavy. Either way, I will be back later this year. Believe that."

Thurman unleashed his power in the final seconds of the second round when he landed a clean left hook to the chin that dropped Lopez to all fours. Lopez was up at the count of six, but Thurman continued to pound him over the final few seconds of the round.

Thurman landed numerous cracking punches to the head and body early in the fourth round, and it was a surprise that Lopez (36-8, 19 KOs), 34, of Riverside, California, remained upright.

Thurman was moving on his toes, firing punches upstairs and downstairs and sometimes planting his feet and landing his jab and hard right hands. By the sixth round, Lopez's face was showing the impact of the punches, as it was turning red with swelling on the left side.

But the tenor of the fight changed in the seventh round when Lopez rocked Thurman with two right hands and spent most of the round chasing him around and landing clean punches.

Final punch stats Fighter Total Jabs Power Thurman 247 of 899 (28%) 79 of 527 (15%) 168 of 372 (45%) Lopez 117 of 513 (23%) 17 of 156 (11%) 100 of 357 (28%) -- Courtesy of CompuBox

Thurman was unsteady, getting knocked back, and in trouble. He looked very weary as the round ended. It was such a lopsided round in Lopez's favor that all three judges scored it 10-8 even though there was no knockdown. Lopez had another good round in the eighth, although he didn't land anything as telling as he did in the seventh.

"He had me buzzed and shaken up in the seventh round, but I tried to stay on the outside and away," Thurman said. "I was a little off in my prediction of how long his arms were. He lunged in and was really willing to commit to the knockout."

Thurman had regained control of the fight as they went into the final rounds. He continued to move, box and mix in hard right hands and combinations to the head. Lopez, however, never gave in. He continued to press Thurman and tried to rough him up on the inside in the 11th and 12th rounds, which were close.

Lopez, a 16-year veteran who once pulled a major upset over Victor Ortiz to earn the nickname of "Riverside Rocky," has lost to the other top opponents he has faced, including the much bigger Canelo Alvarez, Jessie Vargas, Marcos Maidana and Andre Berto. Despite losing to Thurman, Lopez held his head high after giving such a strong performance.

"I definitely thought I held my own in that fight," Lopez said. "I had him hurt in the seventh round, and I was landing a lot of clean shots on him. I was disappointed I couldn't finish him and get him out of there. If he thinks he's the best welterweight out there, then I want two through five lined up for me."

With the win in the bank and having come out of the fight healthy, Thurman reasserted himself in the deep welterweight division, which includes world titleholders Errol Spence Jr., Terence Crawford and Shawn Porter -- whom Thurman already has beaten -- as well as secondary world titlist and superstar Manny Pacquiao.

Thurman is interested in fighting Pacquiao next. It is by far the biggest fight for him in terms of money and name value. It is also a fight that probably could be made fairly easily now that Pacquiao, like Thurman, fights under the PBC banner.

Pacquiao made his PBC debut last Saturday night in Las Vegas and retained his belt by outclassing former titlist Adrien Broner. If Pacquiao does not land a rematch later this year with Floyd Mayweather -- who says he is retired but has considered a Pacquiao sequel -- he has said he is open to fighting any of the other top fighters in the division. Thurman is one of them.

"I would most likely definitely take the Manny Pacquiao fight this year," Thurman said. "I feel good. That was a beautiful fight. I'm ready to fight wherever Pacquiao wants it."