NEW YORK — A bad back prevented Roger Federer from getting ready for the U.S. Open the way he prefers to prepare for a Grand Slam tournament. And it’s showed so far.

Federer blamed a lack of proper practice after making an uncharacteristic 68 unforced errors Thursday and being forced to go five sets again before coming back to edge a cramping Mikhail Youzhny 1-6, 7-6 (3), 6-4, 4-6, 6-2 in Arthur Ashe Stadium.

It’s the first time in his long career that the 36-year-old Federer has played five-setters in the first and second rounds at a major tournament.

“I knew I was going to maybe struggle early on. Maybe I struggled more than I would have liked to. But I’m still in the draw, which gives me a chance. I still believe I’m going to pick up my game and become just more consistent because I’m not playing all that bad,” Federer said. “It’s just that I’m going a bit up and down in waves throughout the match.”

Given that Federer entered the day with a 16-0 career record against Youzhny and a 16-0 mark in the U.S. Open’s second round, one might have thought their match would be a mismatch.

It wasn’t.

“He’s also a real man who plays tennis,” Youzhny said. “He’s not a god.”

Well, OK, that’s true. But remember: Federer didn’t drop a set en route to his record eighth Wimbledon championship in July. And he’s 37-3 with five titles, including two at majors to raise his record total to 19.

Second on that list, with 15, is No. 1-seeded Rafael Nadal, who faced Taro Daniel of Japan late Thursday night. That followed 20th-seeded American CoCo Vandeweghe’s 7-6 (6), 6-2 victory over Ons Jabeur of Tunisia under the lights.

Two seeded women lost to Americans in the afternoon: Shelby Rogers edged No. 25 Daria Gavrilova 7-6 (6), 4-6, 7-6 (5) in a tournament-record 3 hours, 33 minutes, and Jennifer Brady eliminated No. 23 Barbora Strycova, 6-1, 6-1.

A couple of seeded men also departed: No. 7 Grigor Dimitrov and No. 15 Tomas Berdych, the 2010 Wimbledon runner-up.

The No. 3-seeded Federer won five consecutive U.S. Open championships from 2004-08 and also was the runner-up twice, including two years ago.

But he missed last year’s tournament while taking off the second half of the season to let his back and surgically repaired left knee fully heal.

The back, an off-and-on issue for years, flared up again while Federer was losing in the final of the Montreal Masters in August.

“I’m pretty confident that I’m only going to get better from here. That’s a good thing,” Federer said. “Because I’ve played a lot, I definitely found some rhythm now.”

But he did falter repeatedly Thursday.

Federer let a lead slip away in the second set and got broken while serving for it at 5-4.

“He helped me to come back,” Youzhny said.

Federer stumbled again while serving for the fourth set at 5-3, but responded to a break there by breaking right back.

Still, Federer’s unforced errors continued to mount in the fifth set – 11 in the first four games, including a badly shanked forehand on his first break point at 2-1, a netted backhand on his second and a long forehand to let Youzhny hold there. Eventually Federer nosed ahead, aided by the considerable dip in the 35-year-old Youzhny’s play.