By Andrew Both
The mistake was particularly costly for Mahan, who seemed likely to miss the cut by just one stroke at Pinehurst No. 2 where half the field was yet to complete the second round.
The mix-up occurred at the par-four 18th, where the players failed to identify their respective balls before hitting their second shots. It was not until they reached the green that they realized their mistake.
Mahan's caddie, John Wood, publicly accepted the blame.
"It's hard to believe I did something that dumb, but I did," Wood told reporters.
"Off the tee it looked like Hunter's (ball) was in the left center (of the fairway) and Jamie's was on the left edge. And we got up there and they were switched and we didn't realize it.
"It's just one of those things you scratch your head at. I almost want to see the video of the tee shots to see what happened to them in the fairway."
Wood said the only mitigating factor was that both players mark their balls with a similar slash across the number.
"It was one of those things I couldn't explain to you," said Mahan, a five-times winner on the PGA Tour. "It was crazy.
"Off the tee, it looked like that's where my ball should have been, and I couldn't explain to you how it ended up where it did. Just got to pay more attention."
Mahan and Donaldson both made double-bogeys on the hole, their ninth of the day.
Mahan ended up shooting a two-over-par 72 for a six-over total of 146, while Donaldson carded an 81 to finish at 11-over 151.
(Reporting by Andrew Both; Editing by Mark Lamport-Stokes)