(Recasts after Congress vote)
By Mitra Taj and Teresa Cespedes
LIMA, Dec 21 (Reuters) - Peruvian President Pedro Pablo Kuczynski pulled off a surprise victory against the opposition's bid to force him from power as a graft scandal rocks Latin America, with a motion in Congress falling eight votes short of the 87 needed to oust him.
Before hours of debate in Congress, Kuczynski called on lawmakers to set aside his defects to help defend Peru's democracy from what he deemed a hasty "coup" attempt staged by the right-wing opposition Popular Force party.
Popular Force, which emerged under an authoritarian movement in the 1990s, sought to remove Kuczynski from office on grounds he was "morally unfit" to govern after discovering his past business connections to a company at the center of the region's biggest graft scandal.
Kuczynski survived thanks to 19 votes against the motion, 21 abstentions and another 10 lawmakers who failed to show up. A motion to start the "presidential vacancy" proceedings passed with 93 votes last week.
The final vote - widely unexpected just a few days ago - capped a week of intense political uncertainty in the world's second-biggest copper producer and one of Latin America's most stable and robust economies. (Reporting By Mitra Taj and Marco Aquino; Editing by Rosalba O'Brien and Paul Tait)