Twitter announced Monday that its users will be able to change a setting on their accounts to allow anyone to send them a private message. In addition, if a person follows a big account — for example, from a company like United Airlines — the Twitter user can respond to messages sent by that account even if the account, United in this case, does not follow that individual.

Twitter has begun rolling out the new messaging features worldwide. The setting to receive direct messages from anyone will be turned off by default, the company said, so users won’t receive messages from strangers unless they decide to change their settings.

Previously, two Twitter accounts exchanging messages had to follow each other on the service — essentially agreeing to see everything the other account posted publicly — before they could correspond. That often led to annoying exchanges of public messages, in which an account was asked to follow someone so a private chat could begin.

The company’s private messaging feature has long been considered a weak point of its service, which is primarily geared to public conversation. Last year, top executives vowed to make improvements, including some in the group messaging feature that was also recently added.

As Twitter fumbled, other messaging services have grown rapidly. On Friday, WhatsApp, a popular service owned by Facebook, announced that it had reached 800 million active users, up from 600 million in August. Twitter had about 288 million active users as of the fourth quarter.

The changes are likely to make Twitter’s messaging service more useful to a wide variety of users. Corporations, celebrities and politicians will be able to reach out to their followers with special deals and fund-raising appeals and receive responses directly on the service. Journalists and news organizations will be able to receive tips more easily from anonymous Twitter accounts. And individuals will be able to communicate more easily with others on the service about an interesting tweet.

But people who open their inboxes to messages from all comers could also be deluged with spam, harassing messages or other unwanted missives. Indeed, Facebook, the largest social network, treats all messages from strangers as junk mail, exiling them to a special section of its site that is so difficult to find that most people do not know it exists.

Twitter says that to protect users from unwanted messages, if a person deletes a message string from someone who is not a mutual connection, that essentially blocks the other party from sending further private messages.

The new rules can be confusing, and Twitter intends to place a direct-message button in its Android and iOS apps that clearly indicates when a direct message can be sent to an account that the user is viewing.