This post contains references to products from our advertisers. We may receive compensation when you click on links to those products. The content is not provided by the advertiser and any opinions, analyses, reviews or recommendations expressed in this article are those of the author’s alone, and have not been reviewed, approved or otherwise endorsed by any bank, card issuer, airline or hotel chain. Please visit our Advertiser Disclosure to view our partners, and for additional details.

A debit and credit card may look the same, but they offer very different services. One takes money directly out of your bank account at the point of purchase. The other sends you a bill at the end of the month to pay for your transactions. If you’re a Millennial who grew up during the Great Recession or someone else who’s struggled with debt, a debit card may be your first choice for payment.

But overall, Americans increasingly prefer credit cards to debit cards. In 2016, credit cards for the first time surpassed debit cards as the favored payment method, according to the TSYS 2016 U.S. Consumer Payment Study. Forty percent of respondents chose credit cards as their most preferred payment type, compared to 35% who chose debit cards.

That makes sense from a security perspective. While debit cards have the advantage of preventing you from going into debt, they don’t compare to credit cards when it comes to safety. Here’s why.

More Types of Credit Card Transactions Are Protected by Law

Credit card users are much better protected by law. The Fair Credit Billing Act (FCBA) allows you to dispute not only fraudulent charges on your account, but also charges that are the result of merchant error. You can even dispute authorized charges and temporarily withhold payments — without harm to your credit score — if you are unsatisfied with the goods…