Some of the banking industry's most loyal and lucrative customers are flirting with the idea of taking their business elsewhere.

About 10% of midsize businesses are thinking about establishing a relationship with a nonbank provider, such as a marketplace lender, according to a new report by the consulting firm Deloitte. Even more are said to be considering moving to another bank.

The numbers come from a survey of 100 executives in a range of industries, and their reasons for considering a switch vary by sector. Some executives are looking for more financial expertise, while others are simply demanding better mobile apps.

Bankers, of course, pride themselves on providing high levels service to business clients — and offering competitive prices. But the survey provides a clear message: banks' most valuable customers may not be as loyal as they think.

"Just like there has been disruption in the retail market, which is going pretty fast, it's going to bleed over to the middle market," said Deron Weston, a principal at Deloitte. "If you don't pay attention to this disruption and meet it head on, you're at risk of losing valuable market share."

The report, produced by Deloitte's Center for Financial Services survey arm, provides a complicated picture of a traditionally loyal customer base.

Middle-market customers — defined as those with between $10 million and $100 million in revenue — typically have long and steady relationships with their primary banks.

The average deposit account lasts 17 years, while credit and investment accounts typically have slightly shorter tenures.

Most of those companies report being mostly satisfied with their banking relationships. More than 80% of executives said they are unlikely to cut ties with their primary bank in the next few years, where they keep their key deposit accounts and credit lines.

"The smaller the bank, the happier and more satisfied they are," Weston said, noting that midsize businesses tend to have more product relationships with regional and community banks.

But when it comes to specialized services — such as capital markets or payments services — customer preferences get a bit more complicated.

In the survey, about a third of the respondents said they are looking to expand beyond their long-standing banking relationships, in search of a firm with more specialized expertise.

Nine percent of companies said a nonbank provider would suit their needs, while 21% said they would consider switching to another bank.

"It's a hypercompetitive market, and it's going to get even more competitive as the alternative, nonbank [providers] get more sophisticated," Weston said.

The survey did not define the term "nonbanks," but it could encompass marketplace lenders, business development companies and private-equity firms.

One of the factors driving the competition with nonbanks is a concern over credit risk associated with certain industries.

For instance, banks have begun to pull back from leveraged lending, amid a series of warnings from regulators. That shift has created an opening for business development firms, Weston said.

"Banks may be bending over backward for the creditworthy companies," but they are becoming more cautious with businesses that are perceived as risky, said Dana Schwaeber, a consultant with Greenwich Associates.

About a quarter of midsize businesses have accessed credit from a nonbank provider in the past 18 months, according to Greenwich, which surveyed 218 small and midsize companies late last year.

Most of those businesses cited better rates and terms as the reason for turning to nonbanks — but 13% said that they were unable to obtain financing from a traditional bank.

Banks are simply becoming "more cautious," Schwaeber said.

A demand for better technology — particularly on mobile devices — is also fostering competition from nonbanks for middle-market clients.

Weston pointed to high-tech payment companies, such as Square, that are attracting a growing number of small-business clients, in part because their products are easy to use.

"Reducing friction is key," Weston said.

Still, banks say their primary source of competition is among each other.

"We're still going up against the same kind of usual suspects," said Shawn McGowen, head of commercial banking at the $5.8 billion-asset Bank Leumi in New York.

McGowen said that, as he thinks about competition over the long term, he is starting to consider where nonbank providers come into play.

"I think about it all the time," McGowen said.

At the moment, however, the bank — a unit of Leumi Group in Israel — is focusing on upgrading its commercial banking technology

In the coming months, the bank plans to release new mobile features, including the ability to initiate a wire transfer by phone.

Larger banks are also making technology a priority for middle-market banking. For instance, SunTrust Banks in Atlanta recently launched a unit that will search for innovative payments technology to provide to commercial clients.

Banks still have an edge when it comes to wooing — and keeping — middle-market customers, Weston said.

Midsize businesses across all industries have complex financing needs — and demand the type of personalized interactions that nonbank providers have not yet shown they can provide, Weston said.

"The advantage banks have is their longstanding relationships, and their ability to provide advice," he said.