It can be an irresistible temptation: You’re in the car and can’t remember where you’re supposed to meet your friends, so you grab your smartphone and send them a quick text. Or you’re bored on a long highway trip and decide to scroll through Facebook with one hand while keeping the other on the wheel.

However, most states flatly ban the practice, according to distraction.gov, the “official U.S. government website for distracted driving.” In all but four of those states, texting while driving is a primary offense, meaning you can get pulled over and ticketed simply for that alone; in Florida, Iowa, Nebraska and Ohio, you can get ticketed for texting only if you were pulled over for some other offense, such as speeding. (By comparison, only 12 states, along with Washington, D.C., ban all drivers from using handheld mobile phones.)

The number of people killed in distraction-related crashes fell slightly last year, to 3,328 from 3,360 in 2011, according to a report Thursday from the National Highway Traffic Safety Administration. But the estimated number of people injured in distraction-related crashes rose 9%, to 421,000.

In a 2010 Pew Research Center survey, nearly half (47%) of adults who use text messaging (equivalent to 27% of all U.S. adults) said they had sent or received messages while driving. A 2009 survey found that 26% of 16- and 17-year-olds admitted to texting while behind the wheel.

Drew DeSilver  is a senior writer at Pew Research Center.