EDINBURGH—Scottish voters rejected a heated bid for independence, providing a narrow escape for a British government that scrambled to dole out promises of new local powers for Edinburgh to head off the breakup of a 307-year-old union.

Scottish First Minister Alex Salmond said early Friday he had accepted that the majority of Scottish voters had decided not to become an independent country.

The...