Firms in a perfectly competitive market will make zero economic profits in the long run. If demand shifts initially, causing price and quantity to rise, firms will earn positive profits. This will encourage other firms to enter the industry. The supply curve will shift right, driving the price back down until it returns to the initial equilibrium with zero profits. A similar process will occur if a demand decrease causes losses - firms will exit, shifting supply left and raising price back to the equilibrium level. In the long run, all firms will produce where average cost is minimized, demonstrating productive efficiency.