The Casa da Quinta da Comenda was the Mother House of the Ansemil Comenda, which had several Coutos, spread throughout the Beiras, namely in Tarouca, Figueira da Foz, Coimbra, Águeda etc … and in S. Pedro do Sul, Couto da Coja, included what today constitutes the towns of Outeiro da Comenda, Lourosa da Comenda, Bodiosa, Mães and Vila Maior, where, in the latter, was located the square of the Comenda that received the tributes of all those Coutos.