Sant Mateu was a commune within the kingdom of Valencia.