Passage: The deputies' term of office finishes four years after their election or when the Cortes are dissolved, which can take place jointly or separately with the dissolution of the Senate. The dissolution's right belongs to the Monarch who exercises it by request of the President of the Government after the deliberation of the Council of Ministers and under its sole responsibility. The dissolution of the Cortes also takes place if there is a failed legislature or two months after a failed investiture session, in this case the Sovereign dissolves the house with the countersign of the President of the Congress of Deputies. During their mandate, the deputies have some guarantees and privileges in order to carry their responsibilities out according to Section 97 of the Spanish Constitution.

Question: How many years does a deputy hold office?
four