The mother panda, Hua Zui Ba, delivered the cub at the Zoo Aquarium de Madrid after a gestation lasting 131 days, the zoo said in a statement.
The pink cub, lightly covered in white hair, "cried loudly" on its arrival, the zoo said.
The mother bear "took the tiny creature onto its lap within seconds of its birth, licking and protecting it constantly while the veterinary team looked on with emotion".
It was the fourth panda to be born in the zoo, which said it could not rule out the possibility of Hua Zui Ba giving birth to a second cub "in the coming hours".
Hua Zui Ba first gave birth in 2010 to twins Po and De De, both of which were taken in May to China's Chengdu province to be released eventually to their natural habitat.
Another panda, Chulin, was born in the zoo in 1982.
The latest birth was attended by two officials of the Chengdu Panda Base along with the Zoo Aquarium de Madrid's technical and veterinary teams.
The bear cub will be checked by veterinarians on Saturday but will not be shown to the public for "a few months", the zoo said.
Pandas are notoriously reluctant breeders when held in captivity.
Fewer than 1,600 pandas remain in the wild, mainly in China's Sichuan province, with a further 300 in captivity around the world.
Gustavo Fernandez Duque / Madrid Zoo / AFP