The outcome was identical to the pair's last meeting in 2008.
Filipino fighter Pacquiao was a relieved man after two of the three judges ruled in his favour. The third could not separate the pair.
They ultimately decided that a strong finish from Mexico's Marquez was a case of too little, too late.
After the end of the 12th and final round both Pacquiao - viewed by most pundits as the best pound-for-pound boxer in the world - and Marquez adopted a victory pose.Continue reading the main story
This was the second robbery and this one was the worst. We won with clearer punches. It's hard when you're fighting your rival and the three judges tooJuan Manuel Marquez
But to the fury of Marquez and the majority of the sell-out crowd at the MGM Grand arena, Pacquiao got the nod from Dave Moretti (115-113) and Glenn Trowbridge (116-112) while Robert Hoyle had it down as a 114-114 tie.
Cans and bottles rained down on the ring as the boisterous crowd made their feelings clear.
Pacquiao, 32, shaded the early exchanges, which were unusually cagey, and stepped up with a two-punch combo to the head in round four.
But Marquez hit back with a crashing straight right in the fifth and Pacquiao's corner had to give him a pep talk.
Marquez drew blood from his opponent's mouth and landed two good body shots in round eight, but Pacquiao responded in an explosive ninth round.
A slip by Marquez and a Pacquiao claim for a headbutt followed and, despite a late flurry from the Mexican, Pacquiao managed to hang on.
Pacquiao, who earned a minimum of $22m (£14m) and has now won 15 consecutive fights, said: "My fans are very happy because they thought I won."
But Marquez - a 7-1 underdog before the fight - was so upset that he stormed out of the ring.
Referring back to their last encounter, which also ended in controversy, the 38-year-old said: "This was the second robbery and this one was the worst. We won with clearer punches.
"It's hard when you're fighting your rival and the three judges too."