Corral de comedias, literally a "theatrical courtyard", is a type of open-air theatre specific to Spain. In Spanish all secular plays were called comedias, which embraced three genres: tragedy, drama, and comedy itself. During the Spanish Golden Age, corrals became popular sites for theatrical presentations in the early 16th century when the theatre took on a special importance in the country. The performance was held in the afternoon and lasted two to three hours, there being no intermission, and few breaks. The entertainment was continuous, including complete shows with parts sung and danced. All spectators were placed according to their sex and social status.
In modern times, the first buildings devoted to the theatre in Spain appeared in the 16th century. Representations of comedias were instead held in the courtyard of houses or inns where a stage with background scenery was improvised along one of the sides. The three remaining sides served as public galleries to the wealthy, with the remaining spectators watching the play from the open courtyard. The courtyard structure was maintained in permanent theatres built for the purpose from the end of the sixteenth century, called corrales de comedias, which used the open-air enclosed rectangular courtyard typical of a block of houses. Playwrights and dramatists such as Lope de Vega, Juan Pérez de Montalbán, Tirso de Molina, and Pedro Calderón de la Barca created works which were performed in corrales de comedias.
The first permanent theater of this type, Corral de la Cruz, was constructed in Madrid in 1579. The number of theaters increased rapidly after 1600, responding to the public's enthusiasm for this new form of entertainment. The oldest surviving corral, albeit significantly altered, is the Corral de comedias de Alcalá de Henares. This corral, formerly a courtyard theatre, has been roofed and used as a teatro romántico and a cinema, leading to major changes in the building's architecture. The last known such courtyard theatre to be built in Spain, Corral de comedias de Almagro, in Almagro, Castile-La Mancha, is a purpose-built theater that dates to 1628. This only functioning courtyard theater still standing, once one among the many,  annually celebrates the Festival Internacional de Teatro Clásico (International Classical Theatre Festival);
There are recently found remains of a corral in Torralba de Calatrava, which the municipality wished to rebuild in 2006.
The theatre type specific to Spain, was extended to Mexico when a corral de comedias was built in Tecali de Herrera around 1540.
The corrales present some parallels to Elizabethan theatre where productions were held in galleried inns. The George Inn, Southwark is a partially surviving example of such a structure. As well as similarities as regards the type of buildings used, there were similarities in the subject matter of the plays: Spanish literature was translated into English in Shakespeare's time, and in 1613 his company mounted a lost play called Cardenio which appears to have been based on an episode in Don Quixote.
Although Shakespeare was not translated into Spanish until the eighteenth century, his work has since been performed in the corrales; for example in 2016, which saw the quatercentenary of the deaths of Cervantes and Shakespeare, there were Shakespearean productions in Amalgro and Alcalá de Henares.
The stage was installed at one end of the court, against the back wall. In front of the stage was the outdoor patio at the end of which sat the so-called musketeers. The balconies and windows of the adjoining houses formed the quarters reserved for men and women of nobility. In Madrid, above the cazuela, were the quarters of the councilors and other authorities, such as the chairman of the Council of Castile.
On the upper floors were the desvanes (attics), very small quarters, among which stood the tertulia of the church and a second cazuela. The stage and lateral galleries were protected by an overhang. An awning, hung from hooks, protected the men of the common public who sat in the patio from the sun, avoiding contrast between sunlit and shaded areas, such as was found on stage and in the courtyard. That probably also improved the acoustics of the venue, avoiding straining the voices of actors. This provision was similar to the Elizabethan theatres from the same period in England. In the earlier built corrals, there were no toilets: with the advent of "new enlightened governments" during the reign of Philip V, some corrales were closed due to hygiene issues, risk of fire or disorder. With the arrival of a bourgeois class who did not want to watch the plays in awkward spaces such as these, larger theatrical structures were constructed, which required confined spaces and specific acoustic treatment.
During the Spanish Golden Age, any theatrical event was known as comedia. The public came in masses for entertainments like this, whether comedy, drama or tragedy. The season of performances usually began on Easter Sunday, ending on Ash Wednesday. Smoking was forbidden because of the risk of fire, and from October to April the comedia began at two in the afternoon, in the spring at three and at four during summer, in order for all to finish before sunset. The performance's duration was approximately four to six hours, structured in six different rounds: the first act or loa, the opening round, then an appetizer, the second round, the masquerade or jácaras, a third round and the final act. Men and women could not sit together; men occupied the courtyard, side stands, the benches or the central stands, and the women watched the performance from their cazuelas above. The only place where they were allowed to be together was in the chamber corridors. Children were not allowed to attend. The audience paid fees at different points: at the entrance, then a tip to the "brotherhood" or beneficiary, and a third one for the privilege of a seat so they could watch the play comfortably. The theatrical company rarely received as much as 20% of the total. In university towns, it was forbidden to perform on weekdays, so the students would not be distracted. Two characters were instantly recognized in the corrales: the mozo, maintainer of order, equipped with a big garrote to calm the excited spectator, and the "spacer", that is, the one in charge of finding a suitable place for an individual in between two others. The first regulation on the operation of corrals was published by the Royal Council of Castile for the corrales of Madrid, later extended to the whole kingdom. Among its provisions, was the presence of a bailiff whose function was to ensure that no noise, tumults, or scandals ensued and that men and women were kept separated in their respective seating by the required entrances and exits.