On 27 October 1708 she married her first cousin John V of Portugal. Both of their mothers were sisters. Maria Anna thus became Queen of Portugal as the wife of the ruling king. She was the mother of six children: