Sant Pere de Vilamajor is a municipality in the Vallés Oriental region, in the province of Barcelona, in the autonomous community of Catalonia, Spain. It is part of the natural sub-region of Bajo Montseny.
Located at its northernmost end, in the southernmost variant of the La Calma plain. It is one of the largest municipalities in the region but at the same time with one of the lowest population densities.
It borders to the south with Sant Antoni de Vilamajor, to the east with San Esteban de Palautordera and Santa María de Palautordera and Fogars de Monclús, to the north with Montseny and to the west with Tagamanent, Cánoves and Cardedeu.
The discovery of Iberian and Roman remains suggests that there was an Iberian enclave and, later, a Roman villa that was maintained during the Visigothic period. There is no doubt that during the 9th century there was a stable population in Sant Pere de Vilamajor that enjoyed the benefits of a small church.
Sant Pere de Vilamajor was a prominent place in medieval times, since where the church is currently located, was the Palacio Condal of the Counts of Barcelona, Ramón Berenguer IV and Petronila de Aragón.