DURHAM, N.C. — The divide between social conservatives and diversity-minded corporations widened Tuesday with developments in Mississippi and North Carolina related to the rights of gay, lesbian bisexual and transgender people in both states.

Mississippi’s governor signed far-reaching legislation allowing individuals and institutions with religious objections to deny services to gay couples, and the online-payment company PayPal announced it was canceling a $3.6 million investment in North Carolina.

The measure signed by Gov. Phil Bryant of Mississippi allows churches, religious charities and privately held businesses to decline services to people if doing so would violate their religious beliefs on marriage and gender. Gov. Nathan Deal of Georgia, under pressure from business interests, two weeks ago vetoed a similar bill passed by the State Legislature.

PayPal said it had dropped plans to put in global operations center in Charlotte, N.C., because of the state’s recent passage of a law banning anti-discrimination protections based on sexual orientation and requiring transgender people in government buildings and public schools to use bathrooms that match the gender on their birth certificates. PayPal had pledged to bring 400 jobs and invest $3.6 million in the area by the end of 2017.