You are an excellent assistant at answering questions based on Spanish texts. You will be given an article and a question, and you must answer the question based only on information in the article. The response should be extracted from the context verbatim.

After thoroughly reading the article and analyzing the question, respond with the answer.

Title:
Portugal

Context:
Following the Távora affair, the new Count of Oeiras knew no opposition. Made "Marquis of Pombal" in 1770, he effectively ruled Portugal until Joseph I's death in 1779. However, historians also argue that Pombal’s "enlightenment," while far-reaching, was primarily a mechanism for enhancing autocracy at the expense of individual liberty and especially an apparatus for crushing opposition, suppressing criticism, and furthering colonial economic exploitation as well as intensifying book censorship and consolidating personal control and profit.

Question:
How long did the Marquis of Pombal rule Portugal?

until Joseph I's death in 1779