A kharja or kharjah (Arabic: خرجة tr. kharjah [ˈxærʒɐ], meaning "final"; Spanish: jarcha [ˈxaɾtʃa]; Portuguese: carja [ˈxaɾʒɐ]; also known as markaz, is the final refrain of a muwashshah, a lyric genre of Al-Andalus (the Islamic Iberian Peninsula) written in Arabic or Ibero-Romance.
The muwashshah consists of five stanzas (bait) of four to six lines, alternating with five or six refrains (qufl); each refrain has the same rhyme and metre, whereas each stanza has only the same metre. The kharja appears often to have been composed independently of the muwashshah in which it is found.
About a third of extant kharjas are written in Classical Arabic. Most of the remainder are in Andalusi Arabic, but there are about seventy examples that are written either in Ibero-Romance or with significant Romance elements. None are recorded in Hebrew even when the muwashshah is in Hebrew.
Generally, though not always, the kharja is presented as a quotation from a speaker who is introduced in the preceding stanza.
It is not uncommon to find the same kharja attached to several different muwashshahat. The Egyptian writer Ibn Sanā' al-Mulk (1155–1211), in his Dar al-Tirāz (a study of the muwashshahat, including an anthology) states that the kharja was the most important part of the poem, that the poets generated the muwashshah from the kharja, and that consequently it was considered better to borrow a good kharja than compose a bad one.