YOSEMITE NATIONAL PARK, California — A pair of Americans completed what had long been considered the world’s most difficult rock climb Wednesday, using only their hands and feet to scale a 3,000-foot vertical wall on El Capitan, the forbidding granite pedestal in Yosemite National Park that has beckoned adventurers for more than half a century.

Tommy Caldwell and Kevin Jorgeson became the first to free-climb the rock formation’s Dawn Wall, a feat that many had considered impossible. They used ropes and safety harnesses to catch themselves in case of a fall, but relied entirely on their own strength and dexterity to ascend by grasping cracks as thin as razor blades and as small as dimes.

The effort took 19 days as the two dealt with constant falls and injuries. But their success completes a yearslong dream that bordered on obsession for the men.

Caldwell was the first to finish Wednesday afternoon. He waited on a ledge for Jorgeson, who caught up minutes later. The two embraced before Jorgeson pumped his arms in the air and clapped his hands above his head. Then they sat down for a few moments, gathered their gear, changed clothes and hiked to the nearby summit.

About 200 people were waiting for them, including Caldwell’s wife and Jorgeson’s girlfriend, who welcomed them to the top with hugs and kisses. It will take the pair two to three hours to hike down the mountain.

In the meadow far below, another crowd broke into cheers. Relatives of the men watched on telescopic monitors.

Caldwell’s mother, Terry, said her son could have reached the top several days ago, but he waited for his friend to make sure they got there together.

“That’s a deep, abiding, lifelong friendship, built over suffering on the wall together over six years,” she said.

President Barack Obama sent his congratulations from the White House Twitter account, saying the men “remind us that anything is possible.”

The trek up the world’s largest granite monolith began Dec. 27. Caldwell and Jorgeson lived on the wall itself, eating and sleeping in tents fastened to the rock thousands of feet above the ground and battling painful cuts to their fingertips much of the way.

Free-climbers do not pull themselves up with cables or use chisels to carve out handholds. Instead, they climb inch by inch, wedging their fingers and feet into tiny crevices or gripping sharp, thin projections of rock. In photographs, the two appeared at times like Spider-Man, with arms and legs splayed across the pale stone that has been described as smooth as a bedroom wall.

Both men needed to take rest days to heal. They used tape and even superglue to help protect their raw skin. At one point, Caldwell set an alarm to wake him every few hours to apply a special lotion to his throbbing hands.

They also endured physical punishment whenever their grip slipped, pitching them into long, swinging falls that left them bouncing off the rock face. The tumbles, which they called “taking a whipper,” ended with startling jolts from their safety ropes.

Caldwell, 36, and Jorgeson, 30, had help from a team of supporters who brought food and supplies and shot video of the adventure.

The pair ate canned peaches and occasionally sipped whiskey. They watched their urine evaporate into the thin, dry air and handed toilet sacks, called “wag bags,” to helpers who disposed of them.

There are about 100 routes up the rock known among climbers as “El Cap,” and many have made it to the top, the first in 1958. Even the Dawn Wall had been scaled. Warren Harding and Dean Caldwell (no relation to Tommy) made it up in 1970, using climbing ropes and countless rivets over 27 days.

No one, however, had ever made it to the summit in one continuous free-climb – until now.

“He doesn’t understand the magnitude of the accomplishment and the excitement generated,” said Caldwell’s father, Mike Caldwell.

The pioneering ascent comes after five years of training and failed attempts for both men. They only got about a third of the way up in 2010 when they were turned back by storms. A year later, Jorgeson fell and broke an ankle in another attempt. Since then, each has spent time on the rock practicing and mapping out strategy.

On this try, as the world watched and followed on Facebook and Twitter, Jorgeson was stalled in a lower section that took 11 attempts over seven days.

“As disappointing as this is, I’m learning new levels of patience, perseverance and desire,” Jorgeson posted online. “I’m not giving up. I will rest. I will try again. I will succeed.”

Caldwell, of Estes Park, Colorado, is no stranger to El Cap. He has free-climbed 11 different routes and was the first to make such ascents of the Dihedral Wall and West Buttress. He was the third to free-climb the Nose on El Cap. He also made his way up a challenging El Capitan route in fewer than 24 hours – becoming only the second person to do so – only months after accidentally severing his left index finger with a table saw in 2001.

Jorgeson, of Santa Rosa, California, has an impressive list of climbs in the U.S., Europe and South Africa. He works as a climbing instructor and co-founded an advocacy group for climbers.

John Long, the first person to climb up El Capitan in one day in 1975, said it was almost inconceivable that anyone could do something as “continuously difficult” as Caldwell and Jorgeson’s free-climb.