This paper deals with extracting lines in handwritten Persian texts. In the presented method, at first, oblique lines and dots pertaining to words that are the main causes of two lines sticking to each other are eliminated. Then, using morphological operations, the remaining components of lines stick to one another. Finally, each line's border is determined using contours. This method was tested on a database of the First Competition on Line Segmentation in Persian Hand- Written Documents, which was held in conjunction with the First Pattern Recognition and Image Analysis Conference (PRIA 2013) in Birjand, Iran. The results indicated proper accuracy of the proposed method.