With almost 4 million votes cast, Toomey led Democratic U.S. Rep. Joe Sestak by about 76,000 votes, or 51 percent to 49 percent, the secretary of state's office reported in unofficial results.
The Pennsylvania contest has received national attention since Specter, a veteran moderate Republican, switched to the Democrats to avoid a primary defeat by Toomey. He then lost to Sestak in the Democratic primary.
As a member of the House, Toomey was known as a strong social conservative, with a 100 percent rating from the National Right to Life Committee. In his Senate campaign, however, he stressed economic issues.
"Governments don't create wealth, but governments can destroy wealth," he told cheering supporters in a low-key victory speech that called for the extension of all the Bush tax cuts.
Toomey served three terms in Congress before his voluntary departure. He went on to serve as president of the anti-tax Club for Growth.
Sestak, who rose to the rank of rear admiral during more than 30 years in the Navy, was elected to Congress in 2006.