Gross domestic product rose at a faster pace than economists predicted.

Consumer spending and business investment both contributed.