General Motors squeezed out a small profit in the first three months of 2014 after setting aside $1.3 billion to cover the cost of recalls that followed an ignition-switch defect linked to 13 deaths, the company reported Thursday.

The report marked the 17th consecutive profitable quarter for the giant automaker, which has been walloped by a storm of lawsuits, federal and congressional investigations and negative publicity since it began recalling 2.6 million Chevrolet Cobalts and other small vehicles in February. With the scrutiny prompted by the ignition switch problem, GM recalled 4.5 million more vehicles in the first three months of the year.