Pedro de Castro Lazera founded the company Imifarma on 2 December 1960. It was initially focused on the drug distribution market. 
In the 1990s, Imifarma started to operate in the retail market through its own network of pharmacies under the name Extrafarma. The store chain began in the city of Belém and expanded to other areas in the state of Pará and in the neighbor state of Amapá. Later, it expanded to the states of Maranhão, Ceará, Piauí and Rio Grande do Norte. 
In 2013, Extrafarma was acquired by Ultra. With the acquisition, Ultra entered the pharmaceutical retail industry and made Extrafarma its third distribution business and specialty retail chain, along with Ipiranga and Ultragaz. With the acquisition, Extrafarma will expand and open new pharmacy stores inside Ipiranga gas stations and Ultragaz resellers.