LONDON — In a foretaste of the fresh turbulence about to grip British politics, the chancellor Philip Hammond said on Sunday that he would resign if, as expected, Boris Johnson becomes prime minister this week.

Mr. Hammond, who as finance chief is one of the leading figures in Prime Minister Theresa May’s cabinet, made his announcement in an interview with the BBC when asked whether he expected to be fired this week.

“No, I’m sure I am not going to be sacked, because I am going to resign before we get to that point,” Mr. Hammond said, adding that he expected to step down on Wednesday, the day Mrs. May is scheduled to be replaced either by Mr. Johnson, the former foreign secretary, or by Jeremy Hunt, the current foreign secretary.

The manner of Mr. Hammond’s announcement was more surprising than its content, because Mr. Johnson is likely to demand from all members of his new cabinet a pledge to support, if necessary, a departure from the European Union without any agreement on the deadline, Oct. 31.