WASHINGTON — Senator Barack Obama has chosen Senator Joseph R. Biden Jr. of Delaware to be his running mate, turning to a leading authority on foreign policy and a longtime Washington hand to fill out the Democratic ticket, Mr. Obama announced in text and e-mail messages early Saturday.

Mr. Obama’s selection ended a two-month search that was conducted almost entirely in secret. It reflected a critical strategic choice by Mr. Obama: To go with a running mate who could reassure voters about gaps in his resume, rather than to pick someone who could deliver a state or reinforce Mr. Obama’s message of change.