Nevertheless, communities of Morish freed slaves known as "moros cortados" continued to be present throughout various parts of Spain, many of which had been freed as a result of a reciprocal deal with Morocco in 1767. Such former slaves, although baptised continued to discreetly practice their religion. As a result of a second Treaty with Morocco in 1799, the King of Spain formally guaranteed the right of Moroccans in Spain to practice their religion in exchange for Spanish Catholics being granted the same rights in Morocco.