The European Union and the Mercosur bloc of South American countries formally signed a long-sought landmark free trade agreement on Saturday, capping more than a quarter-century of torturous negotiations to strengthen commercial ties in the face of rising protectionism and trade tensions around the world.