The flag in its current form has been official since 2004, though it (or variations on it) may have been in use since the nineteenth century. It was first officially adopted in May 1906, but its use was not permitted during the rule of Francisco Franco; a slightly different version of the flag, with brighter colours and a different configuration of red bars, was readopted in 1984.
In 1996, after a number of different proposals, the City Council of Barcelona adopted a new flag, featuring the official logo of the city (which incorporates Saint George's cross) over the vertical Catalan stripes. The flag enjoyed some political support, but was opposed by some historical and vexillological groups, who campaigned against it.
In 2004, however, the city council "recuperated" the 1906 flag legislation, restoring the original design. Both the traditional (1906) and the modern (1996) designs can be seen today in the city, though the Catalan Vexillology Association (Catalan: Associació Catalana de Vexil·lologia) continues to campaign against the use of the latter.